fix: set nodeModulesDir to manual (#3493)

Hopefully a less invasive fix for #3378

---------

Co-authored-by: Marvin Hagemeister <hello@marvinh.dev>
This commit is contained in:
fry69
2025-09-25 20:54:27 +02:00
committed by GitHub
co-authored by Marvin Hagemeister
parent f82bd7e63d
commit f7a2422e93
8 changed files with 61 additions and 7 deletions
+5
View File
@@ -2,6 +2,11 @@
"name": "@fresh/examples",
"version": "1.0.1",
"license": "MIT",
"imports": {
"fresh": "jsr:@fresh/core@^2.0.0",
"preact": "npm:preact@^10.27.0",
"@preact/signals": "npm:@preact/signals@^2.2.1"
},
"exports": {
"./island": "./src/island.tsx",
"./app1": "./src/app1.tsx",
+3 -1
View File
@@ -8,11 +8,13 @@ import {
} from "@deno/loader";
import * as path from "@std/path";
import * as babel from "@babel/core";
import babelReact from "@babel/preset-react";
import { httpAbsolute } from "./patches/http_absolute.ts";
import { JS_REG, JSX_REG } from "../utils.ts";
import { builtinModules } from "node:module";
// @ts-ignore Workaround for https://github.com/denoland/deno/issues/30850
const { default: babelReact } = await import("@babel/preset-react");
const BUILTINS = new Set(builtinModules);
interface DenoState {
+3 -1
View File
@@ -2,12 +2,14 @@ import type { Plugin } from "vite";
import * as babel from "@babel/core";
import { cjsPlugin } from "./patches/commonjs.ts";
import { jsxComments } from "./patches/jsx_comment.ts";
import babelReact from "@babel/preset-react";
import { inlineEnvVarsPlugin } from "./patches/inline_env_vars.ts";
import { removePolyfills } from "./patches/remove_polyfills.ts";
import { JS_REG, JSX_REG } from "../utils.ts";
import { codeEvalPlugin } from "./patches/code_eval.ts";
// @ts-ignore Workaround for https://github.com/denoland/deno/issues/30850
const { default: babelReact } = await import("@babel/preset-react");
export function patches(): Plugin {
let isDev = false;