This commit is contained in:
josc146
2024-08-04 22:21:33 +08:00
parent 6356527b14
commit 12ef5e8650
+4 -2
View File
@@ -71,7 +71,9 @@ async function runWebpack(isWithoutKatex, isWithoutTiktoken, minimal, callback)
},
plugins: [
minimal
? undefined
? new webpack.ProvidePlugin({
Buffer: ['buffer', 'Buffer'],
})
: new webpack.ProvidePlugin({
process: 'process/browser.js',
Buffer: ['buffer', 'Buffer'],
@@ -104,7 +106,7 @@ async function runWebpack(isWithoutKatex, isWithoutTiktoken, minimal, callback)
alias: {
parse5: path.resolve(__dirname, 'node_modules/parse5'),
...(minimal
? {}
? { buffer: path.resolve(__dirname, 'node_modules/buffer') }
: {
util: path.resolve(__dirname, 'node_modules/util'),
buffer: path.resolve(__dirname, 'node_modules/buffer'),