1 Star 0 Fork 23

hui / vscode-drawio

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.config.ts 937 Bytes
一键复制 编辑 原始数据 按行查看 历史
import * as webpack from "webpack";
import path = require("path");
import { CleanWebpackPlugin } from "clean-webpack-plugin";
const r = (file: string) => path.resolve(__dirname, file);
module.exports = {
target: "node",
entry: r("./src/index"),
output: {
path: r("./dist/extension"),
filename: "index.js",
libraryTarget: "commonjs2",
devtoolModuleFilenameTemplate: "../../[resource-path]",
},
devtool: "source-map",
externals: {
vscode: "commonjs vscode",
},
resolve: {
extensions: [".ts", ".js"],
},
module: {
rules: [
{
test: /\.html$/i,
loader: "raw-loader",
},
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: "ts-loader",
},
],
},
],
},
node: {
__dirname: false,
},
plugins: [
new CleanWebpackPlugin(),
new webpack.EnvironmentPlugin({
NODE_ENV: null,
}),
new webpack.IgnorePlugin(/^canvas$/),
],
} as webpack.Configuration;
TypeScript
1
https://gitee.com/huigg/vscode-drawio.git
git@gitee.com:huigg/vscode-drawio.git
huigg
vscode-drawio
vscode-drawio
master

搜索帮助