Can I use require() rather than import/export? #10329
Replies: 1 comment
-
plugins: [
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I like the require syntax much more than import/export but it doesn't seem supported in React or Webpack, and both or just one could be contributing to this issue.
require("react");
and other modules like that work just fine but if I try to require a component/seperate file, it doesn't let me because it saysTypeError: Cannot assign to read only property 'exports' of object '#<Object>'
It could be a React issue or a Webpack one, idk. Any help would be appreciated.index.js
App.js
Beta Was this translation helpful? Give feedback.
All reactions