mirror of
https://github.com/wassname/chatGPTBox.git
synced 2026-07-18 12:20:15 +08:00
fix Buffer is not defined when using tiny package (#691, https://github.com/josStorer/chatGPTBox/issues/752#issuecomment-2240977750)
This commit is contained in:
@@ -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'),
|
||||
|
||||
Reference in New Issue
Block a user