Open luckyray-fan opened 4 years ago
目前我只能手动魔改下包里面 require 的引用, 不知道有没有什么比较好的 workaround 来源
const path = require('path');
/* @type {import('webpack').Configuration} / module.exports = { mode: 'development', entry: './index.js', output: { path: path.resolve(__dirname, 'build'), filename: 'index.js', libraryTarget: 'commonjs', }, target: 'node', devtool: false, };
目前我只能手动魔改下包里面 require 的引用, 不知道有没有什么比较好的 workaround 来源
/* @type {import('webpack').Configuration} / module.exports = { mode: 'development', entry: './index.js', output: { path: path.resolve(__dirname, 'build'), filename: 'index.js', libraryTarget: 'commonjs', }, target: 'node', devtool: false, };