Closed mickdelaney closed 3 years ago
Can confirm same issue with relay as well, but it came out when I added a dependency which also relies on babel-plugin-macros (twin.macro in particular)
EDIT: Probably it's "just" versions conflicting
├─ @rails/webpacker@npm:6.0.0-beta.7
│ └─ babel-plugin-macros@npm:3.1.0 (via npm:^3.0.1)
│
├─ babel-plugin-emotion@npm:10.2.2
│ └─ babel-plugin-macros@npm:2.8.0 (via npm:^2.0.0)
│
├─ babel-plugin-relay@npm:11.0.2
│ └─ babel-plugin-macros@npm:2.8.0 (via npm:^2.0.0)
│
├─ babel-plugin-relay@npm:11.0.2 [6f433]
│ └─ babel-plugin-macros@npm:2.8.0 (via npm:^2.0.0)
│
├─ twin.macro@npm:2.4.1
│ └─ babel-plugin-macros@npm:2.8.0 (via npm:^2.8.0)
│
└─ uidu@workspace:.
└─ babel-plugin-macros@npm:3.1.0 (via npm:^3.1.0)
fix, i've sort of figured out where i was going wrong.
a few things: https://github.com/mickdelaney/react-webpack-5-ts-relay/compare/fix-issue
happy to close this now.
Hmm, can you leave a quick summary of what you learned here in case it helps future users?
Sure. Will do. Probably Monday/Tuesday. Friday Evening time here 😉
Closing this since it appears to be inactive. If anyone else encounters this problem bug @mickdelaney 😃
babel-plugin-macros
version: ^3.0.1node
version: v15.4.0npm
version: 7.0.15Relevant code or config
What you did: I'm trying to setup react, typescript with relay using webpack 5. I've done this successfully with CRA, but wanted a more customizable config, and also am assessing if i can move to webpack 5. All goes well until i add relay, which relies on babel-plugin-macros.
NOTE: I've attempted to polyfill node for webpack 5.
https://github.com/mickdelaney/react-webpack-5-ts-relay/blob/master/webpack.config.js#L15
What happened:
the full build error is here: https://gist.github.com/mickdelaney/65cedc2e131a1e45edec18a4fb39c68d
Reproduction repository:
https://github.com/mickdelaney/react-webpack-5-ts-relay
Problem description:
Suggested solution:
I'm not an expert on these tools, so am considering just waiting a few months assuming things will stabilize with webpack 5 etc.