Giter VIP home page Giter VIP logo

Comments (6)

axemclion avatar axemclion commented on August 17, 2024

@gagayang What are the plugins that do not work ?

from react-worker-dom.

MrZaYaC avatar MrZaYaC commented on August 17, 2024

@axemclion In my case, when I import react-worker-dom webpack do not compile your project. Also this project is not in npm. Looks like it is really only for demo

from react-worker-dom.

axemclion avatar axemclion commented on August 17, 2024

@MrZaYaC I am currently working on updating this for React 15.x . What is the error you get when you are trying to compile the project ?

from react-worker-dom.

MrZaYaC avatar MrZaYaC commented on August 17, 2024

@axemclion I got no errors, just import stay import, Webpack didn`t compile to ES5 your project.
Here is my config

alias: {
    'react-worker-dom': path.resolve(__dirname, 'node_modules/react-worker-dom/src/page/index.js'),
    'react-worker-dom-worker': path.resolve(__dirname, 'node_modules/react-worker-dom/src/worker/index.js')
            }
    test: /\.jsx?$/,
    loader: 'babel',
    exclude: /node_modules/,
    include: [/node_modules\/react-worker-dom/],
    query: {
        presets: ['react', 'es2015', 'stage-0']
    }

Error:

Uncaught SyntaxError: Unexpected token import

function(module, exports) {

    import React from 'react';
    import reactDOM from 'react-worker-dom'; // Instead of using react-dom
    reactDOM.render(new Worker('worker.bundle.js'), document.getElementById('app'));

}

from react-worker-dom.

MrZaYaC avatar MrZaYaC commented on August 17, 2024

@axemclion Could you please publish your project to npm with compiled dist, so we can import your project like normal people? Thanx

from react-worker-dom.

jpdevries avatar jpdevries commented on August 17, 2024

I'm following the Usage instruction but something is unclear to me

import ReactWorkerDOM from 'react-worker-dom-worker';

I see that the test example Webpack server is mapping react-worker-dom-worker to './../src/worker/index.js. Am I supposed to have to do something like that?

from react-worker-dom.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.