forked from fanruan/fineui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
906 B
39 lines
906 B
2 years ago
|
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||
|
const path = require('path');
|
||
|
|
||
|
module.exports = {
|
||
|
mode: 'development',
|
||
|
entry: './src/index.js',
|
||
|
devServer: {
|
||
|
port: 3000,
|
||
|
liveReload: true,
|
||
|
},
|
||
|
module: {
|
||
|
rules: [
|
||
|
{
|
||
|
test: /\.js$/,
|
||
|
exclude: /node_modules/,
|
||
|
use: {
|
||
|
loader: 'babel-loader',
|
||
|
},
|
||
|
},
|
||
|
{
|
||
|
test: /\.less$/i,
|
||
|
use: ['style-loader', 'css-loader', 'less-loader'],
|
||
|
},
|
||
|
],
|
||
|
},
|
||
|
devtool: 'source-map',
|
||
|
resolve: {
|
||
|
extensions: ['.js', '.ts'],
|
||
|
alias: {
|
||
|
'@': path.resolve(__dirname, './src'),
|
||
|
},
|
||
|
},
|
||
|
plugins: [
|
||
|
new HtmlWebpackPlugin({
|
||
|
template: 'index.html',
|
||
|
}),
|
||
|
],
|
||
|
};
|