1 Star 0 Fork 2

劲哥哥/riju

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.js 1.26 KB
一键复制 编辑 原始数据 按行查看 历史
Radon Rosborough 提交于 2020-06-23 14:51 . LSP working with Python!!
const path = require("path");
const MonacoWebpackPlugin = require("monaco-editor-webpack-plugin");
function isProduction(argv) {
return !argv.development;
}
module.exports = (_, argv) => ({
devtool: isProduction(argv) ? undefined : "source-map",
entry: "./frontend/src/app.ts",
mode: isProduction(argv) ? "production" : "development",
module: {
rules: [
{
test: /\.css$/i,
use: ["style-loader", "css-loader"],
},
{
test: /\.tsx?$/i,
loader: "ts-loader",
options: {
configFile: "tsconfig-webpack.json",
},
exclude: /node_modules/,
},
{
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 MonacoWebpackPlugin()],
resolve: {
alias: {
vscode: require.resolve("monaco-languageclient/lib/vscode-compatibility"),
},
},
});
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/plaodj/riju.git
git@gitee.com:plaodj/riju.git
plaodj
riju
riju
master

搜索帮助