Skip to content

Commit

Permalink
Extract selectors from compiled modules
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianGonz97 committed Apr 25, 2024
1 parent 5ffe1cf commit d3835bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/four-taxis-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'vite-plugin-tailwind-purgecss': patch
---

fix: Extract selectors from compiled modules
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ export function purgeCss(purgeOptions?: PurgeOptions): Plugin {

// compiled JS code
const source = fs.readFileSync(id, { encoding: 'utf8' });
includedModules.push({ raw: source, extension: 'tw' });
includedModules.push({ raw: source, extension: 'tw' }, { raw: info.code, extension: 'tw' });

if (LEGACY) {
// plucks out the `.` (e.g. `.html` -> `html`)
Expand Down

0 comments on commit d3835bf

Please sign in to comment.