Skip to content

Commit 286b96b

Browse files
authored
Support js and ts (#41)
* Support js and ts * Update README
1 parent fc1f04b commit 286b96b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ module.exports = {
3939
};
4040
```
4141
### Configure PurgeCSS
42-
By default PurgeCSS will look for css selectors in your `.html` files inside the `./public` directory and `.vue` files inside the `./src` directory.
42+
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.
4343
```javascript
44-
purge: ['./public/**/*.html', './src/**/*.vue'],
44+
purge: ['./public/**/*.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
4545
```
4646
Check [https://tailwindcss.com/docs/optimizing-for-production](https://tailwindcss.com/docs/optimizing-for-production) for more info.
4747

generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function injectPurgeConfig(api) {
5050
configPath,
5151
tailwindConfig.replace(
5252
'purge: []',
53-
"purge: ['./public/**/*.html', './src/**/*.vue']",
53+
"purge: ['./public/**/*.html', './src/**/*.{vue,js,ts,jsx,tsx}']",
5454
),
5555
);
5656
}

0 commit comments

Comments
 (0)