Closed sean-au closed 3 years ago
Split dependencies based on whether they are needed for production build (local + netlify) or not. Configure netlify.toml to NOT install devDependencies for build.
I am happy to help, I am already doing this (on my modified HYAS theme)
"devDependencies": { "@babel/cli": "^7.14", "@babel/core": "^7.14", "@babel/preset-env": "^7.14", "@fullhuman/postcss-purgecss": "^4.0", "auto-changelog": "^2.3.0", "autoprefixer": "^10.2", "bootstrap": "^5.0", "eslint": "^7.29", "exec-bin": "^1.0.0", "hugo-installer": "^3.0.1", "instant.page": "^5.1", "lazysizes": "^5.3", "markdownlint-cli": "^0.27", "postcss": "^8.3", "postcss-cli": "^8.3", "purgecss-whitelister": "^2.4", "shx": "^0.3.3", "stylelint": "^13.13", "stylelint-config-standard": "^22.0" },
Speed up netlify build times,
@sean-pwd, good one! If you could help, yes please.
PR created https://github.com/h-enk/hyas/pull/159
Summary
Split dependencies based on whether they are needed for production build (local + netlify) or not. Configure netlify.toml to NOT install devDependencies for build.
I am happy to help, I am already doing this (on my modified HYAS theme)
Basic example
"devDependencies": { "@babel/cli": "^7.14", "@babel/core": "^7.14", "@babel/preset-env": "^7.14", "@fullhuman/postcss-purgecss": "^4.0", "auto-changelog": "^2.3.0", "autoprefixer": "^10.2", "bootstrap": "^5.0", "eslint": "^7.29", "exec-bin": "^1.0.0", "hugo-installer": "^3.0.1", "instant.page": "^5.1", "lazysizes": "^5.3", "markdownlint-cli": "^0.27", "postcss": "^8.3", "postcss-cli": "^8.3", "purgecss-whitelister": "^2.4", "shx": "^0.3.3", "stylelint": "^13.13", "stylelint-config-standard": "^22.0" },
Motivation
Speed up netlify build times,