Skip to content

Commit

Permalink
Support js and ts (#41)
Browse files Browse the repository at this point in the history
* Support js and ts

* Update README
  • Loading branch information
andercard committed Dec 5, 2021
1 parent fc1f04b commit 286b96b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -39,9 +39,9 @@ module.exports = {
};
```
### Configure PurgeCSS
By default PurgeCSS will look for css selectors in your `.html` files inside the `./public` directory and `.vue` files inside the `./src` directory.
By default PurgeCSS will look for css selectors in your `.html` files inside the `./public` directory and `.vue, .js, .ts, .jsx, .tsx` files inside the `./src` directory.
```javascript
purge: ['./public/**/*.html', './src/**/*.vue'],
purge: ['./public/**/*.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
```
Check [https://tailwindcss.com/docs/optimizing-for-production](https://tailwindcss.com/docs/optimizing-for-production) for more info.

Expand Down
2 changes: 1 addition & 1 deletion generator/index.js
Expand Up @@ -50,7 +50,7 @@ function injectPurgeConfig(api) {
configPath,
tailwindConfig.replace(
'purge: []',
"purge: ['./public/**/*.html', './src/**/*.vue']",
"purge: ['./public/**/*.html', './src/**/*.{vue,js,ts,jsx,tsx}']",
),
);
}
Expand Down

0 comments on commit 286b96b

Please sign in to comment.