From 896c46f43efeae8e9589bf29fb817de8db68bccd Mon Sep 17 00:00:00 2001 From: Shota Fuji Date: Thu, 25 Feb 2021 06:54:46 +0000 Subject: [PATCH] fix: Transpile prettier for ES5 compat https://github.com/storybookjs/storybook/issues/13562 In a Pull Request that adds dynamic source rendering feature for Vue.js [0], prettier was added as regular dependency. It broke IE11 (ES5) compatibility because prettier is published in ES2015 or later. This commit make Storybook's webpack config to transpile prettier down to ES5. [0] ... https://github.com/storybookjs/storybook/pull/12812 --- lib/core-common/src/utils/es6Transpiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core-common/src/utils/es6Transpiler.ts b/lib/core-common/src/utils/es6Transpiler.ts index 6fe68c6da3c0..06164876cf74 100644 --- a/lib/core-common/src/utils/es6Transpiler.ts +++ b/lib/core-common/src/utils/es6Transpiler.ts @@ -17,7 +17,7 @@ export const es6Transpiler: () => RuleSetRule = () => { return ( !!nodeModulesThatNeedToBeParsedBecauseTheyExposeES6.find((p) => input.includes(p)) || !!input.match( - /[\\/]node_modules[\\/](@storybook\/node-logger|are-you-es5|better-opn|boxen|chalk|commander|find-cache-dir|find-up|fs-extra|json5|node-fetch|pkg-dir|resolve-from|semver|highlight.js)/ + /[\\/]node_modules[\\/](@storybook\/node-logger|are-you-es5|better-opn|boxen|chalk|commander|find-cache-dir|find-up|fs-extra|json5|node-fetch|pkg-dir|prettier|resolve-from|semver|highlight.js)/ ) ); };