Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack5: Fix named exports order in production mode #17229

Merged
merged 1 commit into from Jan 13, 2022

Conversation

shilman
Copy link
Member

@shilman shilman commented Jan 13, 2022

Issue: #15574

What I did

  • Created a babel-plugin-named-exports-order that fills in __namedExportsOrder
  • Added it to builder-webpack5 for the preview iframe

Self-merging @ndelangen

How to test

Repro repo: https://github.com/FBNitro/webpack5-ordering

yarn add babel-plugin-named-exports-order -D

Create a .babelrc.js:

module.exports = { plugins: ['babel-plugin-named-exports-order'] }

View the dev / production storybooks with & without babelrc

@nx-cloud
Copy link

nx-cloud bot commented Jan 13, 2022

☁️ Nx Cloud Report

CI ran the following commands for commit 79e5f5a. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@@ -19,3 +19,9 @@ export const entries = async (_: unknown, options: any) => {

return result;
};

export const babel = async (config: any, options: any) => {
// FIXME: Add this to overrides to only apply to story files
Copy link
Member Author

@shilman shilman Feb 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is leading to #17587 cc @Domiii

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant