Version 3.0.0 breaks webpack build
See original GitHub issueI just upgraded from 1.0.2 to 3.0.0 and now my webpack-dev-server build just hangs forever.
I downgraded to 2.1.0 and the problem has gone away.
Unfortunately I don’t have any logs to share.
My webpack config, for reference:
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
const ErrorOverlayPlugin = require('error-overlay-webpack-plugin');
const WatchExternalFilesPlugin = require('webpack-watch-files-plugin').default;
module.exports = {
entry: {
main: './main.tsx',
},
output: {
path: path.resolve(__dirname, 'bundle'),
filename: '[name].js',
},
resolve: {
extensions: ['.ts', '.tsx', '.js'],
},
devtool: 'source-map',
mode: 'development',
devServer: {
port: 9001,
host: '0.0.0.0',
disableHostCheck: true,
stats: 'minimal',
overlay: {
warnings: true,
errors: true,
},
before(_, server) {
setImmediate(() => {
const qrcode = require('qrcode-terminal');
const chalk = require('chalk');
const hostname = require('os').hostname();
const port = server.listeningApp.address().port;
const localURL = `http://localhost:${port}`;
const remoteURL = `http://${hostname}:${port}`;
console.log();
console.log(chalk.yellow('Ctrl + click here:'), chalk.underline.blue(localURL));
console.log();
console.log(chalk.yellow('On your phone:'), chalk.underline.blue(remoteURL));
console.log();
qrcode.generate(remoteURL);
console.log();
});
},
},
plugins: [
new HtmlWebpackPlugin({
title: 'Controller',
meta: { viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no' },
}),
new FaviconsWebpackPlugin('./assets/robot.png'),
new ErrorOverlayPlugin(),
new WatchExternalFilesPlugin({
files: ['../shared/**/*.ts'],
}),
// new webpack.HotModuleReplacementPlugin(),
],
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.less$/,
use: [{ loader: 'style-loader' }, { loader: 'css-loader' }, { loader: 'less-loader' }],
exclude: /node_modules/,
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
// exclude: /node_modules/,
},
{
test: /\.(png|woff|woff2|eot|ttf|svg)$/,
loader: 'url-loader?limit=100000',
// Need file-loader?
},
],
},
};
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top Results From Across the Web
webpack errors after update to 3.0.0-beta.16 #891 - GitHub
Hi there,. after upgrading to 3.0.0-beta.16, there are some errors in my webpack build that I cannot quite figure out on my own....
Read more >Webpack (v 3.0.0) validateSchema error in dev mode
The new version of webpack-cli adds webpack to the global process object. This causes applications such as webpack-dev-derver to break since ...
Read more >Installation | webpack
This guide goes through the various methods used to install webpack. Prerequisites. Before we begin, make sure you have a fresh version of...
Read more >Webpack - npm
Webpack is a module bundler. Its main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable...
Read more >Development - webpack 3 documentation
webpack built 27b137af6d9d8668c373 in 1198ms Hash: 27b137af6d9d8668c373 Version: webpack 3.0.0 Time: 1198ms Asset Size Chunks Chunk Names app.bundle.js 1.44 MB ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Released the fix as 3.0.1 so at least will not hang without an error.
Thanks a lot for reporting.
Version 4.0 is still beta but already heavily used e.g. by facebooks create-react-app https://www.npmjs.com/package/html-webpack-plugin/v/4.0.0-beta.11
html-webpack-plugin version 4.0 has been released https://dev.to/jantimon/html-webpack-plugin-4-has-been-released-125d
The latest favicons-webpack-plugin provides a error message if the versions missmatch.