2017-06-25 13:13:39 -05:00
|
|
|
import webpack from 'webpack';
|
|
|
|
import HTMLWebpackPlugin from 'html-webpack-plugin';
|
|
|
|
import FriendlyErrorsPlugin from 'friendly-errors-webpack-plugin';
|
|
|
|
import baseConfig from './webpack.config'
|
|
|
|
import env from '../../config/env'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
...baseConfig,
|
|
|
|
entry: {
|
|
|
|
main: [
|
|
|
|
'react-hot-loader/patch',
|
|
|
|
'webpack-dev-server/client?http://localhost:4872',
|
|
|
|
'webpack/hot/only-dev-server',
|
|
|
|
`${env.SRC_ROOT}/webui/src/index.jsx`
|
|
|
|
]
|
|
|
|
},
|
|
|
|
|
|
|
|
output: {
|
|
|
|
...baseConfig.output,
|
|
|
|
publicPath: '/'
|
|
|
|
},
|
|
|
|
|
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
__DEBUG__: true,
|
|
|
|
'process.env.NODE_ENV': '"development"'
|
|
|
|
}),
|
|
|
|
new HTMLWebpackPlugin({
|
|
|
|
title: 'Verdaccio',
|
|
|
|
filename: 'index.html',
|
2017-07-06 09:42:36 -05:00
|
|
|
verdaccioURL: '//localhost:4873/-/verdaccio/',
|
2017-06-25 13:13:39 -05:00
|
|
|
template: `${env.SRC_ROOT}/webui/template.html`,
|
|
|
|
debug: true,
|
|
|
|
inject: true,
|
|
|
|
}),
|
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
|
|
new webpack.NoEmitOnErrorsPlugin(),
|
|
|
|
new FriendlyErrorsPlugin()
|
|
|
|
]
|
|
|
|
}
|