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

59 lines
1.2 KiB

7 years ago
const path = require('path')
7 years ago
// const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
7 years ago
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.config')
7 years ago
7 years ago
module.exports = merge(baseWebpackConfig, {
7 years ago
output: {
path: path.resolve(__dirname, './dist'),
7 years ago
publicPath: '/',
7 years ago
filename: 'build.js',
},
module: {
rules: [
{
test: /\.less$/,
use: [
{ loader: 'style-loader' },
{
loader: 'css-loader',
options: { sourceMap: true },
},
{ loader: 'less-loader',
options: { sourceMap: true },
},
],
},
7 years ago
{
test: /\.css$/,
use: [
'style-loader',
'css-loader',
],
},
7 years ago
],
},
devServer: {
port: 3000,
historyApiFallback: {
7 years ago
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({
template: 'examples/index.html',
filename: 'index.html',
inject: true,
}),
],
})