Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Worker error Error: No code sections found #241

Closed
wellyshen opened this issue Mar 17, 2018 · 5 comments
Closed

Worker error Error: No code sections found #241

wellyshen opened this issue Mar 17, 2018 · 5 comments

Comments

@wellyshen
Copy link

wellyshen commented Mar 17, 2018

Hi guys, I'm using this library (v1.1.1) and I upgraded to webpack v4 with babel 7. When I use the babelrc: false of babel-loader's option I encounter the following error:

2018-03-17 1 58 17

Here's the error snippet of my webpack config:

// ...

      {
        test: /\.jsx?$/,
        exclude: /node_modules/,
        loader: 'babel',
        options: {
          cacheDirectory: isDev,
          babelrc: false,  // <== Turn it off will cause the error
          presets: [
            ['@babel/preset-env', { modules: false, useBuiltIns: 'usage' }],
            '@babel/preset-react',
            '@babel/preset-stage-0',
            '@babel/preset-flow'
          ],
          plugins: [
            'react-hot-loader/babel',
            'loadable-components/babel',
            'lodash'
          ],
          env: { production: { plugins: ['transform-remove-console'] } }
        }
      },

// ...

You can reproduce this issue through here, any suggestion for it?

@ryan-roemer
Copy link
Member

Can you review and #234 and confirm if this is a duplicate or a different issue? Thanks.

@wellyshen
Copy link
Author

wellyshen commented Mar 18, 2018

@ryan-roemer This issue maybe related to #234 (comment). Because I set up my babel-loader option the same in webpack v3, but this error only occurs in webpack v4.

@wellyshen
Copy link
Author

@ryan-roemer Any update for this issue?

@ryan-roemer
Copy link
Member

@wellyshen -- I'm working on a rewrite of inspectpack that is webpack4+ only and we'll transition to that for webpack-dashboard after that is completed.

If folks need something sooner, I'd be open to a PR in upstream inspectpack confirming + fixing this: FormidableLabs/inspectpack#60 in the meantime which would bring back the code sections. (Summary: webpack yet again changed how code segments are are aggregated and our babel parsing in inspectpack needs to update).

@ryan-roemer
Copy link
Member

Fixed in webpack-dashboard@^2-- the dashboard engine (inspectpack) now uses the webpack stats object for code introspection instead of parsing real outputted bundles.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants