javascript - webpack-dev-server --inline recompiles and reloads page but no changes shown -


i'm having issues getting webpack's live reloading working. believe have setup correctly. problem when saving files browser refreshes no changes displayed.

i run webpack development server following command:

webpack-dev-server --inline 

and start php development server command:

php -s localhost:8000 -t public/ 

in public/index.php file include webpack-dev-server.js file:

<script src="http://localhost:8080/webpack-dev-server.js"></script> 

when make changes entry.js , hit save can see files recompiling , browser refreshes. except no changes made.

i following output @ terminal when saving entry.js:

time: 44ms   asset     size  chunks             chunk names  app.js   240 kb       0  [emitted]  main app.css  42.4 kb       0  [emitted]  main chunk    {0} app.js, app.css (main) 222 kb [rendered]    [75] ./src/js/entry.js 108 bytes {0} [built]      + 77 hidden modules webpack: bundle valid. webpack: bundle invalid. hash: 3937d6fc90a1794a8daa version: webpack 1.13.3 

i tried add simple alert("testing"); entry.js got no popup. if check webpack-dev-server.js file line contains word testing finds non.

here contents of webpack.config.js:

const extracttextplugin = require("extract-text-webpack-plugin"); const path = require('path');  module.exports = {   context: __dirname,   entry: path.join(__dirname, '/src/js/entry.js'),   output: {     path: path.join(__dirname, '/public'),     filename: "app.js"   },   module: {     loaders: [       {         test: /\.css$/,         loader: extracttextplugin.extract('style-loader', 'css-loader!postcss-loader')       },       {         test: /\.jsx?$/,         exclude: /(node_modules|bower_components)/,         loader: 'babel',         query: {           presets: ['es2015']         }       },       { test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "url-loader?limit=10000&mimetype=application/font-woff" },       { test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/, loader: "file-loader" }     ]   },   postcss: [     require('postcss-import'),     require('postcss-nested'),     require('autoprefixer'),     require('precss'),     require('postcss-custom-media'),     require('lost')   ],   plugins: [     new extracttextplugin('app.css')   ] }; 

is there i'm doing wrong?

edit: tried following:

php -s localhost:8000 -t public starts webserver. webpack-dev-server --content-base=public --inline --hot --watch" starts webpack-dev-server. load localhost:8000/index.php , monitor console inspector. can see hot module replacement enabled. if modify , save entry.js , include simple alert('hello'); can see in web console it's recompiling. page refreshes, yet nothing happens. no changes seen.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -