Closed Eldelshell closed 6 years ago
Sorry about the delay; if you're still facing this issue, which Handlebars plugin/loader (there are multiple) are you using to generate those files?
I'm guessing it's one of two things:
fs.writeFile
instead of Webpack APIsemit
phase, but that plugin runs after this one so the file never gets picked up (might be able to fix by reordering your plugins in Webpack config)Closing due to staleness, will reopen if I get more info
I was running into the same issue but just found a workaround.
Place html-webpack-plugin
instances before zip-webpack-plugin
instance.
e.g.) in webpack.config.js
:
Bad (generated HTMLs will not be included)
plugins: [
new ZipWebpackPlugin(),
new HtmlWebpackPlugin(),
]
Good (generated HTMLs will be included)
plugins: [
new HtmlWebpackPlugin(),
new ZipWebpackPlugin(),
]
If you use webpack-merge
, try using merge.strategy()
.
Package versions:
"html-webpack-plugin": "^2.30.1",
"webpack": "1.15.0",
"zip-webpack-plugin": "0.3.0"
Because I'm using webpack@v1 for some reason, packages I'm using are so old that the current versions may not have the issue.
Angular 9 generates two main files like below but inside the zip it packages only one file(main-es2015.3340488709685d4e325a.js) main-es5.3340488709685d4e325a.js main-es2015.3340488709685d4e325a.js
new HtmlWebpackPlugin(),
new ZipPlugin({
path: path.resolve(__dirname,'dist'),
filename: 'a.zip',
include: [/.(jpe?g|gif|png|svg|woff(2)?|txt|ico|js|css|html)$/],
exclude: null,
})
]
Hi, first, thanks for this plugin, works great.
I'm having an issue where all the HTML files I'm generating are not being included. I can see that the files are generated (using Handlebars) before everything else on my
dist
folder:All other files are included (even the ones on the lib folder).
I've tried with the default (empty) configuration and with:
Thanks for any help.