Skip to content

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

Description

@kevindurb

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'),
      }),
    ],

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions