You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a way via API to limit output of child bundles when building multiple bundles concurrently?
π¦ Context
Server side React environment requires building both server and client bundles. Now I've noticed a bug that has been currently tagged here #1903 which I also ran into.
What I'm noticing is, in my case when importing my "App" component for the server.tsx file is that I also get the corresponding .css file. This is because "App.tsx" imports a stylesheet.
This is NOT desirable as client.tsx has already bundled those assets.
So again the question is, is there a way to suppress this behavior?
π» Code Sample
Here's how I'm iterating the multiple bundlers.
asyncfunctionasyncForEach(array,cb){for(letindex=0;index<array.length;index++){awaitcb(array[index],index,array);}}// NOTE: "this.bundlers" is simply a map that's storing bundlers by name.asyncrun(watch: boolean=true){awaitasyncForEach(['server','client'],async(k)=>{constbundler=this.bundlers[k];bundler.options.watch=watch;awaitbundler.bundle();});}
π Your Environment
Software
Version(s)
Parcel
1.10.3
Node
8.11.4
npm/Yarn
6.4.1
OS
Mac OS 10.14
The text was updated successfully, but these errors were encountered:
I think it could be possible by using code splitting.
For your server side you would reference css dependencies to an empty module or file while on client side code you would use the regular source codes.
in your package.json you would put something like this
β Question
Is there a way via API to limit output of child bundles when building multiple bundles concurrently?
π¦ Context
Server side React environment requires building both server and client bundles. Now I've noticed a bug that has been currently tagged here #1903 which I also ran into.
What I'm noticing is, in my case when importing my "App" component for the server.tsx file is that I also get the corresponding .css file. This is because "App.tsx" imports a stylesheet.
This is NOT desirable as client.tsx has already bundled those assets.
So again the question is, is there a way to suppress this behavior?
π» Code Sample
Here's how I'm iterating the multiple bundlers.
π Your Environment
The text was updated successfully, but these errors were encountered: