You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was able to solve this with the following workaround:
webpackFinal: async(config)=>{// preset-create-react-app adds an include for the catch-all JS rule and// we need to remove it to allow ES2020 syntax in dependenciesconfig.module.rules=config.module.rules.map((rule)=>{if(!rule.oneOf){returnrule;}return{oneOf: rule.oneOf.map((oneOfRule)=>{if(Array.isArray(oneOfRule.include)&&oneOfRule.include.length===1&&oneOfRule.include[0]===path.resolve(__dirname)){deleteoneOfRule.include;}returnoneOfRule;}),};});returnconfig;},
Describe the bug
Storybook + CRA preset fails due to
ModuleParseError
for projects containing dependencies in ES2020.Steps to reproduce the behavior
See https://github.com/ph-fritsche/repro-storybook-es2020
Expected behavior
Accept imports with ES2020 like CRA does.
Environment
The text was updated successfully, but these errors were encountered: