Skip to content

Instantly share code, notes, and snippets.

@pr1ntr
Last active August 11, 2016 01:06
Show Gist options
  • Save pr1ntr/5417675f396709871929be77f600af6a to your computer and use it in GitHub Desktop.
Save pr1ntr/5417675f396709871929be77f600af6a to your computer and use it in GitHub Desktop.
{
entry: {
app: [path.normalize(`${cwd}/src/js/app.js`)],
vendor: vendors
},
output: {
path: path.normalize(`${cwd}/public/js`),
publicPath: '/js/',
filename: '[name].js',
chunkFilename: '[name].[id].js'
}
}
const config = require('./webpack.config.dev.js');
const webpack = require('webpack');
const webpackDevServer = require('webpack-dev-server');
const compiler = webpack(config);
const server = new webpackDevServer(compiler, {
hot: true,
contentBase: 'public/',
});
server.listen(3004, 'localhost', () => {
console.log('listening');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment