0 Star 1 Fork 2

aeiouaeiouaeiouaeiouaeiouaeiou/riju

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.cjs 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
const path = require("path");
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
const webpack = require("webpack");
function isProduction(argv) {
return argv.mode !== "development";
}
module.exports = (_, argv) => ({
devtool: isProduction(argv) ? undefined : "source-map",
entry: "./frontend/src/app.js",
mode: isProduction(argv) ? "production" : "development",
module: {
rules: [
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.ttf$/,
use: ["file-loader"],
},
{
test: /\.js$/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-env"],
},
},
include: /vscode-jsonrpc/,
},
],
},
node: {
net: "mock",
},
output: {
path: path.resolve(__dirname, "frontend/out"),
publicPath: "/js/",
filename: "app.js",
},
performance: {
hints: false,
},
plugins: [
new webpack.ProvidePlugin({
regeneratorRuntime: "regenerator-runtime/runtime",
}),
new MonacoWebpackPlugin(),
],
resolve: {
alias: {
vscode: require.resolve("monaco-languageclient/lib/vscode-compatibility"),
},
},
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/aeiouaeiouaeiouaeiouaeiouaeiou/riju.git
git@gitee.com:aeiouaeiouaeiouaeiouaeiouaeiou/riju.git
aeiouaeiouaeiouaeiouaeiouaeiou
riju
riju
main

搜索帮助