reshadow
reshadow copied to clipboard
Errors in CodeSandbox for CRA with reshadow/macro
if new project:
reshadow/macro: require(...) is not a function
if shared project:
reshadow/macro: Error: ENOENT: No such file or directory., '/empty.js'
Thank you for this and other issues. I will do my best to go over them, but it will probably be over the weekend.
Hi @comerc, thank you for the issue.
There is known problem on the Codesandbox with postcss
on the babel transpiling.
So there are two things to do to get it work with reshadow/babel
or reshadow/macro
:
- create empty file
empty.js
in the root folder - add util as the dependency (because it is also required by some postcss plugins)
We've made some Codesanbox starters, that you can fork to play around with reshadow
:
- CRA (
reshadow/macro
): https://codesandbox.io/s/reshadowcra-9o9nq388wp - React with
reshadow/babel
: https://codesandbox.io/s/reshadowreact-llm3vo07w9
Just to note, you can also use reshadow
on the Codesandbox without babel and macro, just the runtime version
Thanks!
@lttb CRA is work with [email protected], but it is not work with [email protected].
reshadow/macro: Error: ENOENT: No such file or directory., '/events' Learn more: https://www.npmjs.com/package/reshadow