DSACMS / open

Other
2 stars 1 forks source link

Consider changing build tools to postcss and rollup #43

Open natalialuzuriaga opened 3 months ago

natalialuzuriaga commented 3 months ago

Currently, build tools used for this website are postcss and the 11ty vite plugin. There was a bug present when using the passThroughCopy function that caused files to not be passed in the dist directory of the website, when making a prod build. This is why we decided to abandon the 11ty vite plugin for the metrics website. Look into whether /open is affected by this bug and consider whether it is necessary to change build tools to postcss and rollup.

natalialuzuriaga commented 3 months ago

Looks like /open is affected by this bug, along with some CSS not being applied in the prod build (works fine locally though). Let's change the build tools to match what we have implemented in the metrics website.

For CSS processing, metrics website uses postcss, cssnano, autoprefixer, and fullhuman/postcss-purgecss. Will have to set up a postcss.config file https://github.com/DSACMS/metrics/blob/c009ed50b708de3fe9a4fa50f7511033466aed53/app/postcss.config.js#L3 https://github.com/DSACMS/metrics/blob/c009ed50b708de3fe9a4fa50f7511033466aed53/app/package.json#L9-L10