Skip to content

Commit

Permalink
Merge pull request #6 from storybookjs/kasper/env-bugfixes
Browse files Browse the repository at this point in the history
Set env.bugfixes by default
  • Loading branch information
kasperpeulen authored Jun 20, 2024
2 parents e4b8f89 + 5b72ea0 commit 8b5f60f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ export const webpackFinal = async (config: Configuration, options: Options) => {

const swcFinalOptions: SwcOptions = {
...swcOptions,
env: {
...(swcOptions?.env ?? {}),
// Transpiles the broken syntax to the closest non-broken modern syntax.
// E.g. it won't transpile parameter destructuring in Safari
// which would break how we detect if the mount context property is used in the play function.
bugfixes: swcOptions?.env?.bugfixes ?? true,
},
jsc: {
...(swcOptions.jsc ?? {}),
parser: swcOptions.jsc?.parser ?? {
Expand Down

0 comments on commit 8b5f60f

Please sign in to comment.