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