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

Static site generator with commons chunk plugin manifest generating error #120

Closed
kevindurb opened this issue Feb 8, 2018 · 1 comment
Closed

Comments

@kevindurb
Copy link

Im using this plugin with the CommonsChunkPlugin creating a manifest and im getting this error:

ERROR in ReferenceError: webpackJsonp is not defined
    at main:1:270
    at main:1:84
    at main:1:223
    at ContextifyScript.Script.runInContext (vm.js:59:29)
    at ContextifyScript.Script.runInNewContext (vm.js:65:15)
    at module.exports (/Users/kdurbin/projects/react-toolbox/node_modules/eval/eval.js:69:12)
    at Compilation.<anonymous> (/Users/kdurbin/projects/react-toolbox/node_modules/static-site-generator-webpack-plugin/index.js:42:22)
    at Compilation.applyPluginsAsyncSeries (/Users/kdurbin/projects/react-toolbox/node_modules/tapable/lib/Tapable.js:206:13)
    at self.applyPluginsAsync.err (/Users/kdurbin/projects/react-toolbox/node_modules/webpack/lib/Compilation.js:671:11)

I think its because static site generator is only loading my "main" chunk but not the manifest (all the "meat" or webpack) and it needs to eval the manifest with the main chunk. How do I fix this?

Heres the relevant chunk of my webpack config:

    plugins: [
      new webpack.optimize.CommonsChunkPlugin({
        name: 'manifest',
      }),
      new StaticSiteGeneratorPlugin({
        crawl: true,
      }),
      new CompressionPlugin(),
      new webpack.HashedModuleIdsPlugin(),
      new UglifyJSPlugin(),
      new webpack.DefinePlugin({
        'process.env.NODE_ENV': JSON.stringify('production'),
      }),
    ],

@kevindurb
Copy link
Author

Closing. Solved by issue #84

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

1 participant