-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
UI: Upgrade to Emotion 11 #13300
UI: Upgrade to Emotion 11 #13300
Conversation
a39e6da
to
b4361a2
Compare
@tooppaaa @ndelangen what are the implications to users? Is this a 6.2 change or a 7.0 change? |
Hmm, should not impact users at all AFAIK |
Right now I'm not sure the root cause but when I use the css prop with a style I've defined, that works fine on my actual website, it causes Storybook to apparently infinite loop and crash in my browser. Giving up on trying to make it work for now unless someone has a suggestion on what might be going on lol happy to provide a code sample when I'm in front of my computer. |
Storybook uses @emotion packages v10 and @wordpress/components require v11. Storybook works with version 11 but since there were some merges in @emotion packages we need to set some aliases and also make sure correct versions are installed on top level in node_modules. See storybookjs/storybook#13300 (comment) This workaround was done based on a workaround applied in the Gutenberg project WordPress/gutenberg@bc072fd [MAILPOET-3654]
Storybook uses @emotion packages v10 and @wordpress/components require v11. Storybook works with version 11 but since there were some merges in @emotion packages we need to set some aliases and also make sure correct versions are installed on top level in node_modules. See storybookjs/storybook#13300 (comment) This workaround was done based on a workaround applied in the Gutenberg project WordPress/gutenberg@bc072fd [MAILPOET-3654]
Storybook uses @emotion packages v10 and @wordpress/components require v11. Storybook works with version 11 but since there were some merges in @emotion packages we need to set some aliases and also make sure correct versions are installed on top level in node_modules. See storybookjs/storybook#13300 (comment) This workaround was done based on a workaround applied in the Gutenberg project WordPress/gutenberg@bc072fd [MAILPOET-3654]
Any updates here? |
@vtereshyn AFAIK we are blocked until SB7.0 unless people have other ideas |
Hey hey! I would really love to see this merging into storybook soon! 🥳 🙏🏼 |
@AmirTugi using storybook webpack config (in main.js) with Emotion
|
Thanks for the tip @karol-f. We had to do one additional thing to get it working; we had to add This looks like an issue with yarn or Emotion, not Storybook. Tracking it on a similar (closed) issue: emotion-js/emotion#1974 (comment). Repro here: https://github.com/levymetal/emotion-11-conflict-repro |
@levymetal you have misconfigured your webpack's diff --git a/webpack.config.js b/webpack.config.js
index 74479f3..b2ba83a 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -3,7 +3,7 @@ const path = require("path");
const paths = {
src: path.join(__dirname, "src"),
- nodeModules: path.join(__dirname, "node_modules"),
+ nodeModules: path.join(".", "node_modules"),
};
module.exports = {
@@ -32,7 +32,7 @@ module.exports = {
{
test: /\.(js|jsx)$/,
include: [paths.src],
- exclude: [paths.nodeModules],
+ exclude: /\/node_modules\//,
use: ["babel-loader"],
},
], See in the webpack docs how relative and absolute paths are treated differently in this context: https://webpack.js.org/configuration/resolve/#resolvemodules . Basically, you have made webpack to load |
@Andarist I can't thank you enough for your response. That resolves the issue not just in the repro, but also the actual project I'm working on. Our webpack config has been misconfigured like this for over 5 years 💀. Now many of the other issues we've had suddenly make sense. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
This is blocked till the next major, not inactive. And it's a PR with actual code contributed, not an issue. It shouldn't be free for a bot to carelessly close.
This message looks poorly written for whatever rule is triggering it. The bot is telling users it's going to close a PR and they should contribute a PR instead. |
I've always thought stalebots are a stupid thing. Just because an issue was sufficiently documented and therefore received no new messages, it's somehow no longer relevant? And this after only 30 days? |
Hey everyone! I used to use this excellent quote trick, but found that it's no longer necessary after disabling
|
@mrlubos thanks a lot! I spent almost 2 days figuring this thing out. |
This is being superseded by #17640 |
Issue: #13145
What I did
Upgrade to emotion 11
How to test