🌈 An enterprise-class UI components based on Ant Design and Vue. 🐜
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.

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'),
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,
7 years ago
host: '0.0.0.0',
7 years ago
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,
}),
],
})