-
Notifications
You must be signed in to change notification settings - Fork 103
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
Uncaught ReferenceError: webpackJsonp_name_ is not defined #5
Comments
Workaround:
|
Have same problem. It's fine in dev script but it happens in build script. I has no knowledge about how Webpack work too. But I found a workaround. Add manifest.js and verdor.js to every pages.
|
The fix of ALiangLiang works fine. Thanks a lot! |
Adding those to the content/popup files works for them, but not for the injected js. |
Here are some good resources I've found but haven't quite figured out yet: |
@ALiangLiang where exactly are you injecting the script tags? Think we could make this clear for future people looking to solve this issue. |
Do you have any idea to make it work for the injected js? |
The fix is here: Edit From: plugins: [
htmlPage('popup', 'popup', ['popup']),
htmlPage('background', 'background', ['background']),
...
] To: plugins: [
htmlPage('popup', 'popup', ['manifest', 'vendor', 'popup']),
htmlPage('background', 'background', ['manifest', 'vendor', 'background']),
...
] |
I went ahead and submitted this for a pull edit: I see that it probably will not be published since this repo seems to no longer be maintained. |
No clue for inject.js? |
Hey guys, @HaoweiCh, A workaround for inject.js I found is to comment/remove CommonChunkPlugin from webpack.prod file. /// ............ webpack.prod.js
new ExtractTextPlugin({
filename: 'css/[name].[contenthash].css'
}),
new webpack.HashedModuleIdsPlugin(),
//
// new webpack.optimize.CommonsChunkPlugin({
// name: 'vendor',
// minChunks: function (module) {
// return (
// module.resource &&
// /\.js$/.test(module.resource) &&
// module.resource.indexOf(
// path.join(__dirname, '../node_modules')
// ) === 0
// )
// }
// }),
// new webpack.optimize.CommonsChunkPlugin({
// name: 'manifest',
// chunks: ['vendor']
// }) The reason is explained here: webpack/webpack#368 Note: commenting/removing might not be the perfect solution but it works for me without causing an issue. |
Мда если русский берется - то никогда до конца, до ума дело не доведет. Мне уже надоело мучаться со всеми возникшими проблемами. Расширение готово, но не работает из-за кривой сборки. Спасибо! |
Держите себя в руках, сударь. Вам здесь никто и ничего не должен! |
Извините))) |
Если серьезно. Вы упрекаете меня в шовинизме, хотя делите людей на достойных и недостойных. |
Uncaught ReferenceError: webpackJsonp_name_ is not defined
i think the vendor.js not in html
The text was updated successfully, but these errors were encountered: