Skip to content

Commit

Permalink
fix: another bug in @crxjs/vite-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
linonetwo committed Jan 10, 2024
1 parent 11d8dd5 commit cb02caf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 10 additions & 1 deletion patches/@[email protected]
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
diff --git a/dist/index.mjs b/dist/index.mjs
index 5c3f6291168987c56b816428080e6f1fe9de7107..43366a0ac8e920acf0091400a2f956ef4d73ad9f 100644
index 5c3f6291168987c56b816428080e6f1fe9de7107..a80062f831bc4206426fb8174e3fd4018201f224 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -98,7 +98,7 @@ function encodeManifest(manifest) {
return `export default ${json}`;
}
function parseJsonAsset(bundle, key) {
- const asset = bundle[key];
+ const asset = bundle[key] || bundle[`.vite/${key}`];
if (typeof asset === "undefined")
throw new TypeError(`OutputBundle["${key}"] is undefined.`);
if (asset.type !== "asset")
@@ -979,7 +979,7 @@ const pluginFileWriterPolyfill = () => {
renderCrxDevScript(code, { type, id }) {
if (type === "module" && id === viteClientId) {
Expand Down
6 changes: 3 additions & 3 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 cb02caf

Please sign in to comment.