代码拉取完成,页面将自动刷新
//@ts-check
'use strict';
const path = require('path');
const packageJson = require("./package.json");
//@ts-check
/** @typedef {import('webpack').Configuration} WebpackConfig **/
const buildCore = "dist-core";
/** @type WebpackConfig */
const coreBuilderCS = {
target: ["web", "es2020"],
mode: "production",
entry: "./src/Core/ZGAssembler.ts",
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, buildCore),
filename: `core-cs-${packageJson.version}.js`,
library: { name: "zgassembler", type: "var", export: "ZGAssembler" },
},
externals: {
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
// modules added here also need to be added in the .vscodeignore file
},
resolve: {
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
loader: 'ts-loader',
options: {
configFile: "tsconfig.cs.json"
}
}]
}
]
},
devtool: 'nosources-source-map',
infrastructureLogging: {
level: "log", // enables logging required for problem matchers
},
}
/** @type WebpackConfig */
const coreBuilderNode = {
target: "node",
mode: "production",
entry: "./src/Core/ZGAssembler.ts",
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, buildCore),
filename: `core-nodejs-${packageJson.version}.js`,
library: { name: "zgassembler", type: "commonjs2", export: "ZGAssembler" },
},
externals: {
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
// modules added here also need to be added in the .vscodeignore file
},
resolve: {
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
loader: 'ts-loader',
options: {
configFile: "tsconfig.node.json"
}
}]
}
]
},
devtool: 'nosources-source-map',
infrastructureLogging: {
level: "log", // enables logging required for problem matchers
},
}
/** @type WebpackConfig */
const coreBuilderES6 = {
target: ["web"],
mode: "production",
entry: "./src/Core/ZGAssembler.ts",
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, buildCore),
filename: `core-web-${packageJson.version}.js`,
library: { name: "ZGAssembler", type: "window", export: "ZGAssembler" },
},
externals: {
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
// modules added here also need to be added in the .vscodeignore file
},
resolve: {
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
loader: 'ts-loader',
options: {
configFile: "tsconfig.node.json"
}
}]
}
]
},
devtool: 'nosources-source-map',
infrastructureLogging: {
level: "log", // enables logging required for problem matchers
},
}
module.exports = [
coreBuilderCS, coreBuilderNode, coreBuilderES6
];
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。