0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2024-12-23 22:27:34 -05:00
verdaccio/tools/webpack.dev.config.babel.js

50 lines
1.3 KiB
JavaScript
Raw Normal View History

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 '../src/config/env';
import StyleLintPlugin from 'stylelint-webpack-plugin';
2018-01-28 12:28:03 -05:00
import getPackageVersion from './getPackageVersion';
export default {
...baseConfig,
entry: {
main: [
'react-hot-loader/patch',
'webpack-dev-server/client?http://localhost:4872',
'webpack/hot/only-dev-server',
2017-07-15 15:04:58 -05:00
`${env.SRC_ROOT}/webui/src/index.js`,
],
},
output: {
...baseConfig.output,
2017-07-15 15:04:58 -05:00
publicPath: '/',
},
plugins: [
new webpack.DefinePlugin({
2018-02-19 13:29:14 -05:00
__DEBUG__: true,
2017-07-15 15:04:58 -05:00
'process.env.NODE_ENV': '"development"',
2018-02-19 13:29:14 -05:00
__APP_VERSION__: `"${getPackageVersion()}"`,
}),
new HTMLWebpackPlugin({
title: 'Verdaccio',
filename: 'index.html',
verdaccioURL: '//localhost:4873',
template: `${env.SRC_ROOT}/webui/template/index.html`,
debug: true,
inject: true,
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NoEmitOnErrorsPlugin(),
2017-07-15 15:04:58 -05:00
new FriendlyErrorsPlugin(),
new StyleLintPlugin({
files: ['src/**/*.scss'],
failOnError: false,
emitErrors: false,
syntax: 'scss',
}),
2017-07-15 15:04:58 -05:00
],
};