Files
KnowStreaming/km-console/packages/layout-clusters-fe/config/webpack.dev.js
孙超 860d0b92e2 V3.2
2022-12-16 13:27:09 +08:00

46 lines
1.1 KiB
JavaScript

const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
module.exports = {
mode: 'development',
plugins: [
new MiniCssExtractPlugin(),
new ReactRefreshWebpackPlugin({
overlay: false,
}),
],
output: {
path: '/',
publicPath: '/',
filename: '[name].js',
chunkFilename: '[name].js',
library: 'layout',
libraryTarget: 'amd',
},
devServer: {
host: 'localhost',
port: 8000,
hot: true,
open: true,
openPage: 'http://localhost:8000/',
inline: true,
historyApiFallback: true,
publicPath: `http://localhost:8000/`,
headers: {
'cache-control': 'no-cache',
pragma: 'no-cache',
'Access-Control-Allow-Origin': '*',
},
proxy: {
'/ks-km/api/v3': {
changeOrigin: true,
target: 'https://api-kylin-xg02.intra.xiaojukeji.com/ks-km/',
},
'/logi-security/api/v1': {
changeOrigin: true,
target: 'https://api-kylin-xg02.intra.xiaojukeji.com/ks-km/',
},
},
},
};