Thanks for sharing. I ran into a small issue where the production flag in the postcss config is always false and therefore purgecss is not invoked. The NODE_ENV is "development" even when running npm run build in my case. I am on windows and I am resolving this by changing the build script to set NODE_ENV=production && sapper build --legacy. With that purgecss is invoked and everything is fabulous, thanks again.
Same for me too. I didn't mention that because I couldn't find any official information whether it is an expected behavior or not. Thank you for mentioning.
Was a Civ Eng. then I dropped it and taught my self coding, marketing and design. Currently working at an international company doing Conversion Optimization and SEO. And also creating my own bizz.
Software hacker working in the industry since 2003. Currently loves: #Typescript and #Svelte. Founder of Chimera, the first makerspace in northern California.
Thanks for sharing. I ran into a small issue where the production flag in the postcss config is always false and therefore purgecss is not invoked. The NODE_ENV is "development" even when running
npm run build
in my case. I am on windows and I am resolving this by changing the build script toset NODE_ENV=production && sapper build --legacy
. With that purgecss is invoked and everything is fabulous, thanks again.Same for me too. I didn't mention that because I couldn't find any official information whether it is an expected behavior or not. Thank you for mentioning.
This still happens even though I'm using
set NODE_ENV=production && sapper export --legacy
I find this super weird. Not sure what to do at all.The only way for me to avoid having all the classes in production is to use
purgecss
in both dev and prod. What a bummerWhat about?