Skip to content

Commit b02d029

Browse files
committed
build: minify css file
1 parent 627c81e commit b02d029

File tree

4 files changed

+614
-1074
lines changed

4 files changed

+614
-1074
lines changed

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"main": "index.js",
66
"scripts": {
77
"build": "rm -rf build && NODE_ENV=production npm run build:css && webpack ---config ./config/webpack.prod.config.js",
8-
"dev": "npm run watch:css && webpack-dev-server --config ./config/webpack.dev.config.js --open",
8+
"dev": "npm run watch:css && webpack-dev-server --config ./config/webpack.prod.config.js --open",
99
"lint": "./node_modules/.bin/eslint --ext .js,.jsx src/",
1010
"lint: fix": "./node_modules/.bin/eslint --ext .js,.jsx src/ --fix",
1111
"build:css": "postcss src/assets/css/styles.css -o src/assets/css/main.css",
@@ -44,6 +44,7 @@
4444
"clean-webpack-plugin": "^3.0.0",
4545
"copy-webpack-plugin": "^6.0.1",
4646
"css-loader": "^3.5.2",
47+
"cssnano": "^4.1.10",
4748
"eslint": "^6.8.0",
4849
"eslint-config-airbnb": "^18.1.0",
4950
"eslint-plugin-import": "^2.20.2",

postcss.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
const tailwindcss = require("tailwindcss");
22
module.exports = {
3-
plugins: [tailwindcss("./tailwind.config.js"), require("autoprefixer")],
3+
plugins: [
4+
tailwindcss("./tailwind.config.js"),
5+
require("autoprefixer"),
6+
require("cssnano")({
7+
preset: "default",
8+
}),
9+
],
410
};

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy