mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-08 00:42:15 +02:00
Webpack dashboard
This commit is contained in:
parent
0220f363a7
commit
d099c17f68
|
@ -53,6 +53,7 @@
|
||||||
"opn-cli": "^3.1.0",
|
"opn-cli": "^3.1.0",
|
||||||
"postcss-cli": "^2.5.1",
|
"postcss-cli": "^2.5.1",
|
||||||
"webpack": "^1.12.14",
|
"webpack": "^1.12.14",
|
||||||
|
"webpack-dashboard": "0.0.1",
|
||||||
"webpack-dev-server": "^1.14.1",
|
"webpack-dev-server": "^1.14.1",
|
||||||
"whatwg-fetch": "^1.0.0",
|
"whatwg-fetch": "^1.0.0",
|
||||||
"wrapper-webpack-plugin": "^0.1.7"
|
"wrapper-webpack-plugin": "^0.1.7"
|
||||||
|
|
|
@ -6,6 +6,7 @@ var opn = require('opn');
|
||||||
new WebpackDevServer(webpack(config), {
|
new WebpackDevServer(webpack(config), {
|
||||||
publicPath: config.output.publicPath,
|
publicPath: config.output.publicPath,
|
||||||
historyApiFallback: true,
|
historyApiFallback: true,
|
||||||
|
quiet: true, // lets WebpackDashboard do its thing
|
||||||
}).listen(3000, 'localhost', function (err, result) {
|
}).listen(3000, 'localhost', function (err, result) {
|
||||||
if (err) console.log(err);
|
if (err) console.log(err);
|
||||||
opn('http://localhost:3000');
|
opn('http://localhost:3000');
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var webpack = require('webpack');
|
var webpack = require('webpack');
|
||||||
|
var Dashboard = require('webpack-dashboard');
|
||||||
|
var DashboardPlugin = require('webpack-dashboard/plugin');
|
||||||
|
var dashboard = new Dashboard();
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
devtool: 'eval',
|
devtool: 'eval',
|
||||||
|
@ -10,12 +13,13 @@ module.exports = {
|
||||||
output: {
|
output: {
|
||||||
path: path.join(__dirname, 'dist'),
|
path: path.join(__dirname, 'dist'),
|
||||||
filename: 'choices.min.js',
|
filename: 'choices.min.js',
|
||||||
publicPath: '/assets/scripts/dist/'
|
publicPath: '/assets/scripts/dist/',
|
||||||
},
|
},
|
||||||
eslint: {
|
eslint: {
|
||||||
configFile: '.eslintrc'
|
configFile: '.eslintrc'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
new DashboardPlugin(dashboard.setData),
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
new webpack.DefinePlugin({
|
new webpack.DefinePlugin({
|
||||||
'process.env': {
|
'process.env': {
|
||||||
|
|
Loading…
Reference in a new issue