-
Notifications
You must be signed in to change notification settings - Fork 105
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
Error: ScriptExtHtmlWebpackPlugin: no asset with href #13
Comments
Sorry, I'm not following. The |
Sorry, I was talking about the |
Also getting this error using the inline option. Config is more or less: entry: {
// ...other bundles
popout: path.resolve('src/popout/index.js')
}
plugins: [
new HtmlWebpackPlugin({
template: /* other */,
chunks: ['bundle'],
hash: true,
}),
new HtmlWebpackPlugin({
template: path.resolve('src/popout/index.html'),
filename: 'popout.html',
chunks: ['popout'],
hash: true,
}),
new ScriptExtHtmlWebpackPlugin({
inline: 'popout',
defaultAttribute: 'async',
}),
] May have something to do with using The error: |
I have the same problem in one project where |
@DevNebulae, @echenley |
@mbohgard - the issue fixed wass StyleExt not coping with the HtmlWebpack option |
Closed as @mbohgard's issue assued to be the |
@numical Thanks for giving this a shot. I don't use the hash option with HtmlWebpack since I use the chunkhash feature of Webpack itself. The "no asset with href" error still occurs with the new patch. |
@mbohgard - I'm not sure what your issue can be: chunkhash should be (!) supported. However I have put out a fix for someone else which might be related. Can you try the latest version 1.7.4? If that does not solve your problem, please raise a new issue with your webpack config detailed. |
I've got the same error trying to inline webpack manifest. Here is minimal config to reproduce:
I found that it's order of plugins that matters. If I put ScriptExtHtmlWebpackPlugin after HtmlWebpackPlugin all works as expected.
@numical is it a bug? |
@albv From brief scanning, people have used the configuration you are using, but triggered the bug somehow. So yes, I would say that it is a bug. |
@zangcen try to put ScriptExtHtmlWebpackPlugin after the last of HtmlWebpackPlugin |
Hi All, I will make the README more explicit on this issue - sorry to those who have wasted time with this. With regards to using multiple instances of HtmlWebpackPlugin, this is not yet a scenario that ScriptExt has been designed or tested for. If this is something you would find useful please raise an issue defining what you need and suggesting how you think this is best configured. Better still, create a PR! :-) For ideas, take a look at how the sister plugin style-ext-html-webpack-plugin copes with this scenario. |
One more thing that could give you the "no asset with href" error... If you are using |
@albv - thanks! I had caught that on standard attributes but not resource hints. Fixed in v1.8.3. |
Same here |
Shouldn't the plugin be looking for something within its
src
tag?It happened when I tried to inline a CoffeeScript source with the name
animation.coffee
, which gets transpiled toanimation.js
and in development mode, it will get renamed toanimation.js?[hash]
. Giving the file theasync
attribute works fine with the following regex:/animation\.*/
. What goes wrong here?The text was updated successfully, but these errors were encountered: