Set dynamically aboslute public path on 'npm run watch'; fix http/htt… (#1696)
* Set dynamically aboslute public path on 'npm run watch'; fix http/https hardcoded in watch.js * WEBPACK_PUBLIC_PATH fix
This commit is contained in:
8
watch.js
8
watch.js
@@ -9,15 +9,9 @@ var webpackConfig = require('./webpack.config'),
|
||||
config = require('./assets/config');
|
||||
|
||||
// Internal variables
|
||||
var host = 'http://localhost',
|
||||
port = config.devPort || '3000',
|
||||
compiler;
|
||||
|
||||
webpackConfig.output.publicPath = host + ':' + port + config.output.publicPath;
|
||||
compiler = webpack(webpackConfig);
|
||||
var compiler = webpack(webpackConfig);
|
||||
|
||||
browserSync.init({
|
||||
port: port,
|
||||
proxy: {
|
||||
target: config.devUrl,
|
||||
middleware: [
|
||||
|
||||
Reference in New Issue
Block a user