Open id0Sch opened 6 years ago
Which version of the plugins are you using? Note that dynamic-cdn-webpack >= 4
only works on webpack >=4
Of course :)
"dynamic-cdn-webpack-plugin": "^4.0.0-rc.1",
"html-webpack-inline-source-plugin": "^0.0.10",
"html-webpack-plugin": "^3.2.0",
"webpack": "^4.5.0",
@aulisius do you have any idea what causes it? because for now I've hardcoded the react min bundle in my HTML and it's such a bad practice :\
@id0Sch Can you confirm me that everything is working fine, without dynamic-cdn-webpack-plugin
I'm asking because html-webpack-inline-source-plugin
doesn't have test running webpack@4
and html-webpack-plugin@3
so it might be a bug on there side
Everything is working fine without dynamic-cdn. I will also check with online-source for open issues Thanks! On Thu, May 10, 2018 at 11:58 Thomas Sileghem notifications@github.com wrote:
@id0Sch https://github.com/id0Sch Can you confirm me that everything is working fine, without dynamic-cdn-webpack-plugin
I'm asking because html-webpack-inline-source-plugin doesn't have test running webpack@4 and html-webpack-plugin@3 so it might be a bug on there side
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/mastilver/dynamic-cdn-webpack-plugin/issues/44#issuecomment-387995957, or mute the thread https://github.com/notifications/unsubscribe-auth/AFl9RCGHGzJnBO7O9jXYSPPbS4GxOAPwks5txAE9gaJpZM4T02Dx .
I can't see any issue in inline-source that could cause this issue.
Bit busy with vacation. Will try to get to this tmrw. I think it might be something to do with ordering of plugins and in what order they access the HtmlWebpackPlugin
event hooks.
Finally got around to creating a repro https://github.com/aulisius/dynamic-cdn-issue-44-repro/blob/master/webpack.config.js . Really sorry for the delay @id0Sch . Will get working soon.
@aulisius It's fine :) Let me know if you need anything else 👍 Thanks again!
@id0Sch Sorry for the delay, I don't think there is a real solution here as if you try to in-line the JS, you are loosing the benefit of this plugin
https://github.com/DustinJackson/html-webpack-inline-source-plugin#basic-usage has a inlineSource
options that should be used to not include url starting by https://unpkg.com/#/
I wonder if we can make the error more explicit
Maybe we should set source
to throw when called?
Any progress or advice to solve this issue? I met the same problem.
I have the same issue. I want big dependencies to be fetched from CDN while keeping my code inline.
The key is to modify the inlineSource
to only include sources that are local.
Here is how I fixed it:
new HtmlWebpackPlugin({
inlineSource: '^[^(//)]+\.(js|css)$' // exclude source with `//`
}),
new DynamicCdnWebpackPlugin(),
new HtmlWebpackInlineSourcePlugin(),
@njzjz I hope this is helpful.
Hi, I'm trying to add dynamic cdn support for my repo but I encounter this error:
Everything was working fine before I added dynamic-cdn and this is my plugins section (ignore the dynamic entry suport) I saw in the code that this plugin applies the HTMLwbepack plugin and I suspect that this causes the inline-source-plugin to not work.
versions
It would be great to be able to use both plugins, Thanks for the hard workd on this project!