Replies: 1 comment 1 reply
-
So it seems I can configure Parcel to do one or the other. If I add
to my If instead, I add
to my But, I can't find any way to combine these. Even calling Parcel twice with different input files doesn't work because it pulls the main/module definition out of the package.json which is a shared resource :( It seems I need a way to tell Parcel about the structure of my project in package.json, like:
And then be able to call Parcel without the explicit list of source files. This feels like something that probably already exists, but I haven't been able to find it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a project that has the main html file, some js code, and some js modules that will be loaded later dynamically (but which are not directly referenced in the main code).
I assumed I could just tell Parcel2 about these module files and they would get optimised and added to the output folder, but that appears not to be the case.
Given a simple sample project with three files like below:
package.json
src/index.html
src/test.mjs
When I run
npm run assemble
the ./dist folder gets two files added ['index.html','test.js']. The index.html is processed as expected, the test.js is empty.What I want to happen is the test.mjs to get minimised but still contain the export function.
Does anyone have a suggestion on how I can get Parcel2 to do this? (or am I trying to do the impossible?)
Beta Was this translation helpful? Give feedback.
All reactions