build: handle latest json-stable-stringify replacement (#15049)

This commit is contained in:
Senao 2023-11-22 11:51:28 +08:00 committed by GitHub
parent f576d98265
commit bcc4a61135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,8 +117,8 @@ function createNodePlugins(
replacement: `__require`, replacement: `__require`,
}, },
'json-stable-stringify/index.js': { 'json-stable-stringify/index.js': {
pattern: /^var json = typeof JSON.+require\('jsonify'\);$/gm, src: "require('jsonify')",
replacement: 'var json = JSON', replacement: 'JSON',
}, },
// postcss-import uses the `resolve` dep if the `resolve` option is not passed. // postcss-import uses the `resolve` dep if the `resolve` option is not passed.
// However, we always pass the `resolve` option. Remove this import to avoid // However, we always pass the `resolve` option. Remove this import to avoid