reshadow icon indicating copy to clipboard operation
reshadow copied to clipboard

Errors in CodeSandbox for CRA with reshadow/macro

Open comerc opened this issue 5 years ago • 4 comments

Edit frosty-varahamihira-hbo4f

if new project: reshadow/macro: require(...) is not a function

if shared project: reshadow/macro: Error: ENOENT: No such file or directory., '/empty.js'

comerc avatar Jun 16 '19 09:06 comerc

Thank you for this and other issues. I will do my best to go over them, but it will probably be over the weekend.

antonk52 avatar Jun 17 '19 18:06 antonk52

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:

  1. create empty file empty.js in the root folder
  2. 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

lttb avatar Jun 18 '19 04:06 lttb

Thanks!

comerc avatar Jun 23 '19 18:06 comerc

@lttb CRA is work with [email protected], but it is not work with [email protected].

Edit reshadow-cra-i0ksj

reshadow/macro: Error: ENOENT: No such file or directory., '/events' Learn more: https://www.npmjs.com/package/reshadow

comerc avatar Jun 24 '19 09:06 comerc