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
Setting stats.all to false causes watch to never finish compile #12976
Comments
For maintainers only:
|
No bugs stats: {
all: false,
version: true,
errorsCount: true,
warningsCount: true,
}, |
Nvm, I'm wrong. unsure why I was seeing that before then. |
I am having a similar issue: the build finishes, but never exits the shell. I want to know what in the webpack core could have caused this problem? My webpack config: const path = require('path');
const ProgressBarPlugin = require('progress-bar-webpack-plugin');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const config = require('./config');
module.exports = {
mode: 'production',
entry: {
app: ['./src/index.js']
},
output: {
path: path.resolve(process.cwd(), './lib'),
publicPath: '/dist/',
filename: 'element-ui.common.js',
chunkFilename: '[id].js',
libraryExport: 'default',
library: 'ELEMENT',
libraryTarget: 'commonjs2'
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: config.alias,
modules: ['node_modules']
},
externals: config.externals,
performance: {
hints: 'false'
},
stats: {
children: false
},
optimization: {
minimize: false
},
module: {
rules: [
{
test: /\.(jsx?|babel|es6)$/,
include: process.cwd(),
exclude: config.jsexclude,
loader: 'babel-loader'
},
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
compilerOptions: {
preserveWhitespace: false
}
}
},
{
test: /\.css$/,
loaders: ['style-loader', 'css-loader']
},
{
test: /\.(svg|otf|ttf|woff2?|eot|gif|png|jpe?g)(\?\S*)?$/,
loader: 'url-loader',
query: {
limit: 10000,
name: path.posix.join('static', '[name].[hash:7].[ext]')
}
}
]
},
plugins: [
new ProgressBarPlugin(),
new VueLoaderPlugin()
]
}; |
Bug report
What is the current behavior?
If you set
stats.all
tofalse
in the webpack config causes watch to never properly indicate it has finished a compile and prevents webpack from picking up future changes.Additionally, this affects other tools like webpack-dev-server, preventing them from ever becoming available since they don't think webpack has completed the initial compilation.
Related: #12748
If the current behavior is a bug, please provide the steps to reproduce.
Reproduction: https://github.com/maclockard/webpack-5-stats-no-exit
Run the following commands after cloning to reproduce:
yarn
yarn repro
You will see that webpack never prints out
webpack 5.28.0 compiled successfully
and does not pick up any further changes to./index.js
.If you run
yarn no-repro
instead everything works as expected.What is the expected behavior?
Webpack when watching indicates when it has finished the initial compile, and picks up further changes. Additionally, it lets webpack-dev-server know it has completed so that it can become available.
Other relevant information:
webpack version: 5.28.0
Node.js version: 12.19.1
Operating System: macOS 11.2
webpack-cli version: 4.5.0
The text was updated successfully, but these errors were encountered: