Skip to content

Commit

Permalink
Explicitly depend on babel plugin
Browse files Browse the repository at this point in the history
Running the latest version of Storybook logged a warning during
building:

    One of your dependencies, babel-preset-react-app, is importing the
    "@babel/plugin-proposal-private-property-in-object" package without
    declaring it in its dependencies. This is currently working because
    "@babel/plugin-proposal-private-property-in-object" is already in
    your node_modules folder for unrelated reasons, but it may break at
    any time.

    babel-preset-react-app is part of the create-react-app project,
    which is not maintianed anymore. It is thus unlikely that this bug
    will ever be fixed. Add
    "@babel/plugin-proposal-private-property-in-object" to your
    devDependencies to work around this error. This will make this
    message go away.

As the warning indicates, this is a known issue in create-react-app[1],
which was actually fixed[2], but there has not been a release with that
fix.

Add the plugin to our devDependencies to work around the issue. Long
term, we need to figure out what to do about create-react-app.

[1] facebook/create-react-app#13325
[2] facebook/create-react-app#12364
  • Loading branch information
jasonaowen committed Aug 22, 2023
1 parent d12f3f2 commit 1f993cf
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
25 changes: 22 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"web-vitals": "^3.4.0"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"@storybook/addon-essentials": "^7.3.2",
"@storybook/addon-interactions": "^7.3.2",
"@storybook/addon-links": "^7.3.2",
Expand Down

0 comments on commit 1f993cf

Please sign in to comment.