1 Star 0 Fork 0

Hyperledger/cactus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
webpack.dev.node.js 1.55 KB
一键复制 编辑 原始数据 按行查看 历史
const packageDir = process.cwd();
// This code does not run in production and therefore the dynamic require is
// considered acceptable since it provides developer convenience.
// eslint-disable-next-line @typescript-eslint/no-var-requires
const pkg = require(`${packageDir}/package.json`);
const packageNameNoScope = pkg.name.substring(pkg.name.lastIndexOf("/") + 1);
const libraryName = `${packageNameNoScope}`;
/** @type {import("webpack").Configuration} */
module.exports = {
entry: {
[pkg.main]: `${packageDir}/src/main/typescript/index.ts`,
},
target: "node",
mode: "development",
devtool: "inline-source-map",
module: {
rules: [
{
test: /\.(js|ts)$/,
use: ["shebang-loader"],
},
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: "ts-loader",
options: {
transpileOnly: true,
configFile: "tsconfig.json",
},
},
],
},
{
test: /\.(js|ts)$/,
enforce: "pre",
use: [
{
loader: "source-map-loader",
},
],
},
],
},
plugins: [],
resolve: {
extensions: [".ts", ".js"],
},
output: {
filename: "[name]",
path: packageDir,
libraryTarget: "umd",
library: libraryName,
umdNamedDefine: true,
globalObject: "this",
},
externals: {
"swarm-js": "swarm-js",
"node-ssh": "node-ssh",
npm: "npm",
"fabric-client": "fabric-client",
"fabric-ca-client": "fabric-ca-client",
},
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hyperledger/cactus.git
git@gitee.com:hyperledger/cactus.git
hyperledger
cactus
cactus
main

搜索帮助

Cb406eda 1850385 E526c682 1850385