Skip to content

Commit

Permalink
Merge pull request #258 from nksaraf/disable-crawler-in-node_modules
Browse files Browse the repository at this point in the history
feat: don't crawl for styles in node_modules
  • Loading branch information
nksaraf authored Mar 18, 2024
2 parents c2535c3 + 1c67f7f commit 00d68f0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/seven-glasses-stare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"vinxi": patch
---

feat: don't crawl for styles in node_modules
8 changes: 6 additions & 2 deletions packages/vinxi/lib/manifest/collect-styles.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use strict";

import { isBuiltin } from "node:module";

import { join, resolve } from "../path.js";

import { isBuiltin } from "node:module";

const skip = [
"react/jsx-dev-runtime",
"react",
Expand Down Expand Up @@ -49,6 +49,10 @@ async function getViteModuleNode(vite, file, ssr) {
node = await vite.moduleGraph.getModuleById(nodePath);
}

if (nodePath.includes('node_modules')) {
return;
}

let prev = vite.config.logger.error;
vite.config.logger.error = () => {};
try {
Expand Down

0 comments on commit 00d68f0

Please sign in to comment.