Skip to content

Commit

Permalink
feat: tailwind css fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jrishabh55 committed Jul 10, 2020
1 parent 7bbbc25 commit 30c4db4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"start": "react-scripts start",
"build": "yarn build:tailwind && react-scripts build",
"prebuild:css": "yarn build:tailwind",
"build:css": "postcss src/assets/tailwind.css -o src/assets/main.css",
"build:tailwind": "tsc ./src/tailwind.config.ts",
"build:css": "tailwindcss build ./src/assets/tailwind.css -o ./src/assets/main.css",
"build:tailwind": "tsc ./src/tailwind.config.ts && mv ./src/tailwind.config.js ./",
"test": "react-scripts test",
"eject": "react-scripts eject",
"format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
Expand Down
2 changes: 1 addition & 1 deletion postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
const tailwindcss = require('tailwindcss');

module.exports = {
plugins: [tailwindcss('./src/tailwind.config.js'), require('autoprefixer')],
plugins: [tailwindcss('./tailwind.config.js'), require('autoprefixer')],
};
7 changes: 6 additions & 1 deletion src/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
const config = {
purge: [],
purge: {
enabled: true,
content: ['./src/**/*.tsx'],
},
target: 'relaxed',
prefix: '',
important: false,
Expand Down Expand Up @@ -728,3 +731,5 @@ const config = {
};

export default config;

module.exports = config;

0 comments on commit 30c4db4

Please sign in to comment.