Skip to content

Commit

Permalink
Make sure CRA sandboxes are not transpiling destructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
kasperpeulen committed Jul 1, 2024
1 parent 453f933 commit b15400e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions code/lib/cli/src/sandbox-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ type BaseTemplates = Template & {
const baseTemplates = {
'cra/default-js': {
name: 'Create React App Latest (Webpack | JavaScript)',
script: 'npx create-react-app {{beforeDir}}',
script: `
npx create-react-app {{beforeDir}} && \
jq '.browserslist.production[0] = ">0.9%"' package.json > tmp.json && mv tmp.json package.json
`,
expected: {
// TODO: change this to @storybook/cra once that package is created
framework: '@storybook/react-webpack5',
Expand All @@ -103,7 +106,10 @@ const baseTemplates = {
},
'cra/default-ts': {
name: 'Create React App Latest (Webpack | TypeScript)',
script: 'npx create-react-app {{beforeDir}} --template typescript',
script: `
npx create-react-app {{beforeDir}} --template typescript && \
jq '.browserslist.production[0] = ">0.9%"' package.json > tmp.json && mv tmp.json package.json
`,
// Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed.
skipTasks: ['smoke-test', 'bench'],
expected: {
Expand Down

0 comments on commit b15400e

Please sign in to comment.