mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 07:41:58 +08:00
Merge pull request #30923 from storybookjs/kasper/unicode-esbuild
Core: Prebundle jsdoc-type-pratt-parser again
This commit is contained in:
commit
5501e70150
@ -71,7 +71,6 @@ const INCLUDE_CANDIDATES = [
|
||||
'fast-deep-equal',
|
||||
'html-tags',
|
||||
'isobject',
|
||||
'jsdoc-type-pratt-parser', // TODO: Remove this once it's converted to ESM: https://github.com/jsdoc-type-pratt-parser/jsdoc-type-pratt-parser/issues/173
|
||||
'loader-utils',
|
||||
'lodash/camelCase.js',
|
||||
'lodash/camelCase',
|
||||
|
@ -511,7 +511,6 @@
|
||||
"better-opn": "^3.0.2",
|
||||
"esbuild": "^0.18.0 || ^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0 || ^0.25.0",
|
||||
"esbuild-register": "^3.5.0",
|
||||
"jsdoc-type-pratt-parser": "^4.0.0",
|
||||
"polished": "^4.2.2",
|
||||
"recast": "^0.23.5",
|
||||
"semver": "^7.6.2",
|
||||
@ -599,6 +598,7 @@
|
||||
"globby": "^14.0.1",
|
||||
"jiti": "^1.21.6",
|
||||
"js-yaml": "^4.1.0",
|
||||
"jsdoc-type-pratt-parser": "^4.0.0",
|
||||
"lazy-universal-dotenv": "^4.0.0",
|
||||
"leven": "^4.0.0",
|
||||
"markdown-to-jsx": "^7.7.2",
|
||||
|
@ -106,6 +106,17 @@ async function run() {
|
||||
outdir: 'dist',
|
||||
sourcemap: false,
|
||||
treeShaking: true,
|
||||
supported: {
|
||||
// This is an ES2018 feature, but esbuild is really strict here.
|
||||
// Since not all browser support the latest Unicode characters.
|
||||
//
|
||||
// Also this feature only works in combination with a Regex polyfill that we don't load.
|
||||
//
|
||||
// The Hermes engine of React Native doesn't support this feature,
|
||||
// but leaving the regex alone, actually allows Hermes to do its own thing,
|
||||
// without us having to load a RegExp polyfill.
|
||||
'regexp-unicode-property-escapes': true,
|
||||
},
|
||||
} satisfies EsbuildContextOptions;
|
||||
|
||||
const browserEsbuildOptions = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user