I am using Parcel to bundle my Javascript files. Everything works fine when using the localhost server to test out the build, however in production it doesn't like dynamic imports.
Here is the code snippet that I am importing:
if (condition) {
await import('./components/modify_root.js');
} else {
await import('./components/index_root.js');
}
My exact error is this. The app.js
error is pointing to the second line in the code snippet.
The libraries I am using are PreactJS for frontend framework and node-sass for CSS.