forked from myliang/x-spreadsheet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.dev.js
31 lines (30 loc) · 992 Bytes
/
webpack.dev.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
const merge = require('webpack-merge');
const common = require('./webpack.config.js');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CleanWebpackPlugin = require('clean-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
module.exports = merge(common, {
mode: 'development',
plugins: [
new CleanWebpackPlugin(['dist']),
// you should know that the HtmlWebpackPlugin by default will generate its own index.html
new HtmlWebpackPlugin({
template: './index.html',
title: 'x-spreadsheet',
}),
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: '[name].[contenthash].css',
// chunkFilename: devMode ? '[id].[hash].css' : '[id].css',
}),
],
output: {
filename: '[name].[contenthash].js',
},
devtool: 'inline-source-map',
devServer: {
host: '0.0.0.0',
contentBase: './dist',
},
});