Skip to content

Commit bcc4a61

Browse files
authoredNov 22, 2023
build: handle latest json-stable-stringify replacement (#15049)
1 parent f576d98 commit bcc4a61

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎packages/vite/rollup.config.ts

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

0 commit comments

Comments
 (0)
Please sign in to comment.