fictionco / fiction

(Join Waiting List) Personal Marketing Platform. A powerful platform for your online identity.
https://www.fiction.com
1.42k stars 109 forks source link

Unneccessary import of identical files "@factor/dashboard/theme/reset.less" and "@factor/ui/css/standard-reset.less" in Prod mode #258

Closed bppdddqqqq closed 2 years ago

bppdddqqqq commented 3 years ago

Reason for this issue

It's a pretty specific issue, but I've found this during inspection of build output.

Factor seems to include 2 identical reset stylesheets during the build process in production mode and uses them during non-dashboard navigation. This also raises a question why Factor includes Dashboard CSS files in the non-dashboard navigation...

Steps to reproduce

Examine the output of served Factor site after build

arpowers commented 3 years ago

The reason is due to some Webpack quirks but the shared CSS should only happen in development. (Webpack has a rough time in dual build setups and we ultimately decided it was simplest to share the build in dev)

On this topic, we will absolutely be moving to Vite (or possibly Snowpack) in newer versions of Factor. These newer tools have non of the problems that Webpack created.

bppdddqqqq commented 3 years ago

I understand, I've resorted to monorepoing the dashboard for now and removing the incriminating less file. But thanks for the explanation 👍