parcel-static-template
parcel-static-template copied to clipboard
Start a simple static site with components and hot reloading.
``` // postcss.config.js const purgecss = require("@fullhuman/postcss-purgecss"); module.exports = { plugins: [ purgecss({ content: ["./src/*.html"] }), require("autoprefixer") ] }; ```
``` $ NODE_ENV=production node ./tools/image-optimizer.js && node ./tools/webp-converter.js && parcel build ./src/*.html --no-source-maps --public-url ./ 🚨 /Users/pugson/Sites/thinko-animation-studio-web/src/about.html: tree.forEach is not a function at collapseWhitespace (/Users/pugson/Sites/thinko-animation-studio-web/node_modules/htmlnano/lib/modules/collapseWhitespace.js:24:10) at /Users/pugson/Sites/thinko-animation-studio-web/node_modules/htmlnano/lib/modules/collapseWhitespace.js:32:28 at Array.forEach ()...
The `.posthtmlrc` plugin order is possibly incorrect. `posthtml-webp` might need to be last.
When running `yarn start` assets that were added before the server was started are not being converted to WEBP.