This is just ES6 imports, if no file type is passed it assumes a .js file, in this case you’re using a .jsx file which vanilla JS doesn’t understand, thus you need to provide the filetype.
You are right, jsx seems to be no longer needed for compilation.[quote=“cstrat, post:3, topic:18510, full:true”]
I thought if importing from a .jsx file it might work, matching the extension and all.Anyway - why doesn’t this work then:
import {Layout, Welcome} from ‘./app.jsx’;
[/quote]
But this works fine for me and here’s a quick example for you:
If they’re in the same folder you should be able to just use import routes from './app.jsx';, as for the path of AuthContainer I’d recommend you use absolute paths eg. import Downloader from '/client/modules/core/components/downloader.jsx'; I tend to find them easier and faster to understand, especially with a team.
Unfortunately though I’m not sure why ./app.jsx isn’t working for you… if they’re in the same folder that should be fine. The fact you’re having to leave the folder then reenter it means either its a very strange bug indeed, or they’re not actually in the same folder.
All of my imports were working fine using absolute paths. However when I updated to beta 11 (and now beta 12) they all fail on build with an Error: Cannot find module.
Any insights? Is this a bug in the beta release, or something else entirely?