8 Star 58 Fork 23

Gitee 极速下载 / vscode-drawio

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/hediet/vscode-drawio
克隆/下载
webpack.config.ts 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
import * as webpack from "webpack";
import path = require("path");
import { CleanWebpackPlugin } from "clean-webpack-plugin";
import * as CopyPlugin from "copy-webpack-plugin";
const r = (file: string) => path.resolve(__dirname, file);
module.exports = {
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"],
fallback: {
path: require.resolve("path-browserify"),
fs: false,
},
},
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({
DEV: "0",
}),
// Without `as any`, I get "Excessive stack depth comparing types with TS 3.2"
new webpack.IgnorePlugin({ resourceRegExp: /^canvas$/ }) as any,
new CopyPlugin({
patterns: [
{ from: "./src/features/LiveshareFeature/assets", to: "." },
],
}),
],
} as webpack.Configuration;
TypeScript
1
https://gitee.com/mirrors/vscode-drawio.git
git@gitee.com:mirrors/vscode-drawio.git
mirrors
vscode-drawio
vscode-drawio
master

搜索帮助