Replies: 1 comment
-
It looks like you're using dynamic imports which load modules asynchronously - therefore, they are placed in separate files that can be loaded on demand. import component from "./components/component";
import anotherComponent from "./components/anotherComponent";
// render it now or whenever you want to
component.render();
anotherComponent.render(); or CommonJS const component = require("./components/component");
const anotherComponent = require("./components/anotherComponent"); I hope this helps |
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.
-
Hello everyone,
Currently, when I run
parcel build
it generates anindex.xxx.js
file and alsocomponent.xxx.js
andanotherComponent.xxx.js
files which are separate scripts from mysrc/scripts
that are loaded throughindex.js
Would it then be possible to bundle all JS files into one single JS file instead of having X number of minifed JS files?
Beta Was this translation helpful? Give feedback.
All reactions