加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.dev.js 787 Bytes
一键复制 编辑 原始数据 按行查看 历史
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');
const { stylePaths } = require('./stylePaths');
const HOST = process.env.HOST || 'localhost';
const PORT = process.env.PORT || '9000';
module.exports = merge(common('development'), {
mode: 'development',
devtool: 'eval-source-map',
devServer: {
host: HOST,
port: PORT,
historyApiFallback: true,
open: true,
static: {
directory: path.resolve(__dirname, 'dist'),
},
client: {
overlay: true,
},
},
module: {
rules: [
{
test: /\.css$/,
include: [...stylePaths],
use: ['style-loader', 'css-loader'],
},
],
},
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化