Comments (6)
I'll take a look ASAP
from webpack-plugin-hash-output.
I also encounter this issue on version 3.1.1, but version 3.1.0 not has this problem.
from webpack-plugin-hash-output.
@wulucxy, @sunkeysun could you try with
plugins: [
new WebpackPluginHashOutput(),
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'public/index.html',
chunks: ['manifest', 'vendor', 'app']
})
]
(i.e. webpack-plugin-hash-output before html-webpack-plugin)?
According to my test this should fix the problem. If that's the case, I'll update the README and, if possible, try to detect the wrong order and print a warning.
from webpack-plugin-hash-output.
@scinos this is OK。but how is this happen?
from webpack-plugin-hash-output.
TLDR: we changed the webpack phase where the plugin runs and now it competes with html-webpack-plugin
So in v 3.1.1 and 1.3.1 we changed the webpack hook used to run the plugin from after-optimize-chunk-assets
to emit
. The reason for using after-optimize-chunk-assets
in the past was mainly because I didn't know better (😩), I should have used emit
form the beginning because it makes more sense. This was also causing bugs with other plugins (#22).
So now it runs in emit
. But there are other plugins that also run on emit
, like html-webpack-plugin
). I do have a test for html-webpack-plugin
, and because it run fine, I didn't consider this could break anything, my bad.
For the plugin to work it has to be the first plugin in the emit
phase (which is determined by the order of the plugins in your webpack.config.js
.
from webpack-plugin-hash-output.
I released a new version (3.2.0) that will print a warning if there are other plugins that might interfere with us:
[WARNING] There are other plugins configured that might interfere with
webpack-plugin-hash-output. For this plugin to work correctly, it should
be the first plugin in the "emit" phase. Please be sure that the rest of the
plugins run after webpack-plugin-hash-output (ensure they are listed after
webpack-plugin-hash-output in the 'plugins' option in your webpack config).
Plugins that could interfere with webpack-plugin-hash-output:
* HtmlWebpackPlugin
from webpack-plugin-hash-output.
Related Issues (13)
- vendor bundle not updated correctly HOT 1
- Fails with Webpack 4 HOT 2
- Maximum call stack size exceeded HOT 11
- Hung in infinite loop HOT 4
- When used with source maps, webpack looks for a bundle hash that is actually the source map hash HOT 1
- Loading chunk failed HOT 3
- Usage with devtool: "hidden-source-map" HOT 5
- Output hash must add the hash in the `emit` compiler hook for webpack 3. HOT 2
- 1.3.0 is blocking webpack building
- mini-css-extract-plugin logic is broken HOT 2
- Webpack 5 migration HOT 1
- plugin doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-plugin-hash-output.