Skip to content

Commit dd41a87

Browse files
fix(vite): exclude packages from deno cache in prefresh (#3374)
When disabling `node_modules` directory in Deno, prefresh plugin transforms files in ~/.cache/deno/npm/registry.npmjs.org/ directory, causing an arcane error to occur: preactjs/prefresh#124 After disabling this transform my site now works on updated fresh version I'm not sure if is the correct way to exclude this, but I don't see any longer pattern that would work here The cache is stored in $XDG_CACHE_HOME/deno/npm/$REGISTRY_HOST, where only deno/npm part seems to be static --------- Co-authored-by: Marvin Hagemeister <marvin@deno.com>
1 parent 7999d50 commit dd41a87

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/plugin-vite/src

packages/plugin-vite/src/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export function fresh(config?: FreshViteConfig): Plugin[] {
174174
...devServer(),
175175
prefresh({
176176
include: [/\.[cm]?[tj]sx?$/],
177-
exclude: [/node_modules/],
177+
exclude: [/node_modules/, /[\\/]+deno[\\/]+npm[\\/]+/],
178178
parserPlugins: [
179179
"importMeta",
180180
"explicitResourceManagement",

0 commit comments

Comments
 (0)