Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
fix: use "/@fs/" url for default entry path
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa committed Nov 5, 2023
1 parent 0efd1a7 commit 6d18e91
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 4 deletions.
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"name": "remix-vite-pnpm-monorepo"
"name": "remix-vite-pnpm-monorepo",
"pnpm": {
"patchedDependencies": {
"@remix-run/dev@0.0.0-nightly-3874120-20231103": "patches/@remix-run__dev@0.0.0-nightly-3874120-20231103.patch"
}
}
}
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
"engines": {
"node": ">=18.0.0"
}
}
}
14 changes: 14 additions & 0 deletions patches/@remix-run__dev@0.0.0-nightly-3874120-20231103.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/dist/vite/plugin.js b/dist/vite/plugin.js
index 268c8853fbb12f022bc43f5da3d6d07d9c778ea7..6de56d722afa26fc7e1a04e6b9519acb51b2f669 100644
--- a/dist/vite/plugin.js
+++ b/dist/vite/plugin.js
@@ -70,6 +70,9 @@ const normalizePath = p => {
const resolveFileUrl = ({
rootDirectory
}, filePath) => {
+ if (filePath.includes("/node_modules/")) {
+ return `/@fs` + filePath;
+ }
let relativePath = path__namespace.relative(rootDirectory, filePath);
if (relativePath.startsWith("..") || path__namespace.isAbsolute(relativePath)) {
throw new Error(`Cannot resolve asset path "${filePath}" outside of root directory "${rootDirectory}".`);
10 changes: 8 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d18e91

Please sign in to comment.