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

60 lines
1.3 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'),
publicPath: '/ant-design-vue/',
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,
7 years ago
host: '0.0.0.0',
7 years ago
historyApiFallback: {
7 years ago
rewrites: [
{ from: /./, to: '/ant-design-vue/index.html' },
7 years ago
],
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,
}),
],
})