webpack-dev-server

Webpack-dev-server 2 Uncaught TypeError: util.inherits is not a function

橙三吉。 提交于 2019-12-10 15:21:58
问题 I have a problem trying when i run webpack-dev-server not console error in compilation time but throws the next error in browser when i go to http://localhost:8080/: Uncaught TypeError: util.inherits is not a function. is strange beacause works well with webpack without webpack-dev-server. when i debug the error the error is in file webpack:///./~/websocket-driver/lib/websocket/streams.js?875d and the error is this segment: var Stream = require('stream').Stream, util = require('util'); var IO

Webpack hot module replacement in server code

匆匆过客 提交于 2019-12-10 14:24:06
问题 All the webpack examples I have looked at so far deal with client side hot module replacement, for example: this and this. According to the webpack document, one can use EITHER webpack-dev-server OR middlewares (webpack-dev-webpack-dev-middleware and webpack-hot-middleware, along with webpack-hot-middleware/client in a config entry , and integrated into e.g. express js) to enable hot module replacement for client side codes Is it possible to enable hot module replacement for server side codes

Angular 4 - webpack: wait until bundle finished: /

Deadly 提交于 2019-12-10 13:47:02
问题 I am using Angular-Cli and I have updated all of my package.json using the ncu tool. Now when I do a npm start (webpack-dev-server --port 4200 --config config/webpack.dev.js --open --progress --profile --watch --content-base src/), webpack hangs at webpack: wait until bundle finished: / Is it possible to isolate the package causing the problem? I tried using display-error-details flag but it says it isnt recognized. I dont think it will help even if it is set. There is no error thrown, just

Unable to HMR (Hot Module Replacement) css/scss with Webpack 2.2.0 and webpack-dev-server 2.2.1

旧街凉风 提交于 2019-12-10 12:37:00
问题 Versions "extract-text-webpack-plugin": "^2.0.0-rc.2", "webpack": "^2.2.0", "webpack-dev-server": "^2.2.1" Issue "extract-text-webpack-plugin": "^1.0.1", "webpack": "^1.14.0", "webpack-dev-server": "^1.16.2" No longer able to HMR css/scss since upgrading to version 2, changing the styles triggers a change (see output sample below) but I have to manually refresh the page to see the changes the page does not auto refresh, also if I make a change to a js file after changing a scss file the

Webpack not copying css into dist

白昼怎懂夜的黑 提交于 2019-12-10 11:46:57
问题 I have the following css files: <link rel="stylesheet" href="style/select.css"> <link rel="stylesheet" href="style/site.css"> and the following webpack config var path = require("path"); module.exports = { entry: { app: './src/index.js' }, output: { path: path.resolve(__dirname + '/dist'), filename: '[name].js', }, module: { rules: [ { test: /\.(css|scss)$/, use: [ 'style-loader', 'css-loader', ] }, { test: /\.html$/, exclude: /node_modules/, loader: 'file-loader?name=[name].[ext]', }, { test

bundle.js missing from webpack build when using webpack-dev-server

喜欢而已 提交于 2019-12-10 04:10:17
问题 I looked at similar but couldnt find a concerete answer that resolved my issue. I can't find the bundle.js file even though I am specifying where it should be outputted and everything works in the browser. I understand that the webpack-dev server is loading the files from memory and nothing is being written to disk, how I can get the file to be built and added to the dir specified in the output property in the config file? Here is my package.json: { "name": "redux-simple-starter", "version":

Webpack 4 devtool option does not work with webpack-dev-server

僤鯓⒐⒋嵵緔 提交于 2019-12-10 02:56:34
问题 Before I decided to post this issue, I did quite a few things as a background check. So, my problem is: - I use webpack v4.6.0 and webpack-dev-server v3.1.3 - they work fine together, but now I am trying to set up source maps for my application, it seems that devtool option does not work. At least for me, I have tried and tested every option from the list: Webpack 4 - Sourcemaps : this issue suggests that devtool: 'source-map' should work out of the box, but this is not the case for me how to

Webpack Dev Server (webpack-dev-server) Hot Module Replacement (HMR) Not Working

馋奶兔 提交于 2019-12-10 02:15:32
问题 I have gone through many answers on StackOverflow & on GitHub issues as well but, I am still stuck in Hot Module Replacement in Webpack. I am using npm start to run my server with webpack-dev-server --hot --inline . I am trying to change code in my React component, but nothing happens in the browser . I am using Google Chrome Version 49.0.2623.87 (64-bit) on Ubuntu 14.04LTS. In my browser console , I am getting log messages as [HMR] Waiting for update signal from WDS... [WDS] Hot Module

How to use gulp webpack-stream to generate a proper named file?

回眸只為那壹抹淺笑 提交于 2019-12-10 01:58:38
问题 Currently we're using Webpack for our Module loader, and Gulp for everything else (sass -> css, and the dev/production build process) I want to wrap the webpack stuff into gulp, so all I have to do is type gulp and it starts, watches and runs webpack and the rest of what our gulp is setup to do. So I found webpack-stream and implemented it. gulp.task('webpack', function() { return gulp.src('entry.js') .pipe(webpack({ watch: true, module: { loaders: [ { test: /\.css$/, loader: 'style!css' }, ]

Webpack command not found

风格不统一 提交于 2019-12-10 01:21:31
问题 I have installed webpack using npm install -g webpack and npm install webpack I also installed webpack-dev-server npm install -g webpack-dev-server After completion of installation, I ran the command webpack but, it shows below error webpack: command not found I am not getting what is the error. 回答1: Your webpack exists in ./node_modules/.bin/ folder . So you should execute this command : ./node_modules/.bin/webpack Check out the answer in this thread . webpack command not working 回答2: As a