加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.renderer.config.js 869 Bytes
一键复制 编辑 原始数据 按行查看 历史
孔乙己拉夫米 提交于 2022-01-14 19:19 . 修改成TS版本
const rules = require("./webpack.rules");
const path = require("path");
const ForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
const WebpackRouterGenerator = require("webpack-router-generator");
process.env.NODE_ENV = "development";
module.exports = {
module: {
rules,
},
target: "electron-renderer",
resolve: {
alias: {
"@": path.join(__dirname, "./src"),
assets: path.join(__dirname, "./src/assets"),
"~": path.join(__dirname),
},
preferRelative: true,
extensions: [".ts", ".tsx", "..."],
},
plugins: [
new ForkTsCheckerWebpackPlugin(),
new WebpackRouterGenerator({
KeyWord: "route",
fileDir: path.join(__dirname, "./src/pages"),
comKey: "component",
outputFile: path.join(__dirname, "./src/router/list.js"),
exts: [".js", ".jsx", ".tsx"],
}),
],
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化