12345678910111213141516171819202122232425262728293031323334353637 |
- var config = require('../config')
- var webpack = require('webpack')
- var merge = require('webpack-merge')
- var utils = require('./utils')
- var baseWebpackConfig = require('./webpack.base.conf')
- var HtmlWebpackPlugin = require('html-webpack-plugin')
- Object.keys(baseWebpackConfig.entry).forEach(function (name) {
- baseWebpackConfig.entry[name] = ['./build/dev-client'].concat(baseWebpackConfig.entry[name])
- })
- module.exports = merge(baseWebpackConfig, {
- module: {
- rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap })
- },
- mode: 'development',
-
- devtool: 'eval-source-map',
- plugins: [
- new webpack.DefinePlugin({
- 'process.env': config.dev.env,
- 'COMMIT_HASH': JSON.stringify('DEV'),
- 'DEV_OVERRIDES': JSON.stringify(config.dev.settings),
- '__VUE_OPTIONS_API__': true,
- '__VUE_PROD_DEVTOOLS__': false
- }),
-
- new webpack.HotModuleReplacementPlugin(),
-
- new HtmlWebpackPlugin({
- filename: 'index.html',
- template: 'index.html',
- inject: true
- })
- ]
- })
|