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.
ant-design-vue/webpack.config.js

53 lines
1.2 KiB

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const merge = require('webpack-merge');
const baseWebpackConfig = require('./webpack.base.config');
7 years ago
7 years ago
module.exports = merge(baseWebpackConfig, {
mode: 'development',
7 years ago
output: {
path: path.resolve(__dirname, './dist'),
publicPath: '/',
7 years ago
filename: 'build.js',
},
module: {
rules: [
{
test: /\.less$/,
use: [
6 years ago
{ loader: 'vue-style-loader' },
7 years ago
{
loader: 'css-loader',
options: { sourceMap: true },
},
{ loader: 'less-loader', options: { sourceMap: true, javascriptEnabled: true } },
7 years ago
],
},
7 years ago
{
test: /\.css$/,
6 years ago
use: ['vue-style-loader', 'css-loader'],
7 years ago
},
7 years ago
],
},
devServer: {
port: 3000,
7 years ago
host: '0.0.0.0',
7 years ago
historyApiFallback: {
rewrites: [{ from: /./, to: '/index.html' }],
7 years ago
},
disableHostCheck: true,
headers: { 'Access-Control-Allow-Origin': '*' },
},
performance: {
hints: false,
},
7 years ago
devtool: '#source-map',
7 years ago
plugins: [
new HtmlWebpackPlugin({
7 years ago
template: 'site/index.html',
7 years ago
filename: 'index.html',
inject: true,
}),
],
});