Auth0 when using Worker-Plugin and React


I have a problem with Auth0 wih worker-plugin and React (with removing Auth0 everything is ok).

Here is the error

Module parse failed: Cannot read property 'length' of undefined
File was processed with these loaders:
 * ./node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.

… and my babel config (with react-app-rewired)

    exclude: /node_modules/,
    test: /\.worker\.js$/,
    use: [
        loader: "babel-loader",
            options: {
                presets: ["@babel/preset-react"],
                plugins: ["@babel/plugin-syntax-jsx", "inline-json-import", "transform-class-properties", '@babel/plugin-transform-flow-strip-types'],
config.plugins.push(new WorkerPlugin({

If you would have any ideas it would be great

It was due to a case from worker-plugin, here is the PR Fix `Module parse failed: Cannot read property 'length' of undefined` by jebbench · Pull Request #94 · GoogleChromeLabs/worker-plugin · GitHub.

1 Like

Perfect and thanks for sharing it with the rest of community!