0
This is Jsx import export problem. Please help.
Js1.jsx : a = 3; export default a; Js2.jsx; import a from './Js1.jsx' There is this error : Cannot use import statement outside a module
1 Answer
0
If you are not going to export anything, use "require" instead of "import". You probably need to export from Js2.jsx in order to have a well defined module. The purpose of modules is to expose (by exporting) code anyways.