Skip to content

Commit

Permalink
build(deps): bump rollup from 2.78.1 to 2.79.2 in /packages/vite-plug…
Browse files Browse the repository at this point in the history
…in (#922)

* build(deps): bump rollup from 2.78.1 to 2.79.2 in /packages/vite-plugin
* build(deps): bump vite from 3.1.7 to 3.2.11 in /packages/vite-plugin

Bumps [rollup](https://github.com/rollup/rollup) from 2.78.1 to 2.79.2.
- [Release notes](https://github.com/rollup/rollup/releases)
- [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md)
- [Commits](rollup/rollup@v2.78.1...v2.79.2)

---
updated-dependencies:
- dependency-name: rollup
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: update lockfile

* chore: upgrade vite

* tests: update plugin output snapshots

* chore: add changeset

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jack Steam <[email protected]>
  • Loading branch information
dependabot[bot] and jacksteamdev authored Oct 27, 2024
1 parent 5b48ced commit ef545f6
Show file tree
Hide file tree
Showing 6 changed files with 138 additions and 54 deletions.
6 changes: 6 additions & 0 deletions .changeset/witty-rats-attack.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@crxjs/vite-plugin": patch
---

build(deps): bump rollup from 2.78.1 to 2.79.2 in /packages/vite-plugin
build(deps): bump vite from 3.1.7 to 3.2.11 in /packages/vite-plugin
4 changes: 2 additions & 2 deletions packages/vite-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"magic-string": "^0.26.0",
"picocolors": "^1.0.0",
"react-refresh": "^0.13.0",
"rollup": "2.78.1",
"rollup": "2.79.2",
"rxjs": "7.5.7"
},
"devDependencies": {
Expand Down Expand Up @@ -117,7 +117,7 @@
"rollup-plugin-esbuild": "4.10.3",
"svelte": "^3.48.0",
"typescript": "^4.6.4",
"vite": "^3.1.7",
"vite": "^3.2.11",
"vite-plugin-inspect": "0.7.25",
"vitest": "0.28.5",
"vue": "3.2.47"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Array [
"src/content.tsx-loader.js",
"src/content.tsx.js",
"src/popup.html",
"vendor/chunk-D6CDYV2H.js__v--hash.js",
"vendor/chunk-B65QLFCX.js__v--hash.js",
"vendor/crx-client-port.js",
"vendor/crx-client-preamble.js",
"vendor/id-__x00__react-jsx-dev-runtime.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Array [
"src/lib/Counter.svelte.js",
"src/lib/Counter.svelte__svelte_type--style_lang.css.js",
"src/popup.html",
"vendor/chunk-3BFMV3YN.js__v--hash.js",
"vendor/chunk-VLENHBPV.js__v--hash.js",
"vendor/crx-client-port.js",
"vendor/svelte-hmr-runtime-hot-api-esm.js__v--hash.js",
"vendor/svelte-hmr-runtime-hot-api.js__v--hash.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,23 @@ const __vitePreload = function preload(baseModule, deps, importerUrl) {
if (!deps || deps.length === 0) {
return baseModule();
}
const links = document.getElementsByTagName(\\"link\\");
return Promise.all(deps.map((dep) => {
dep = assetsURL(dep);
if (dep in seen)
return;
seen[dep] = true;
const isCss = dep.endsWith(\\".css\\");
const cssSelector = isCss ? '[rel=\\"stylesheet\\"]' : \\"\\";
if (document.querySelector(\`link[href=\\"\${dep}\\"]\${cssSelector}\`)) {
const isBaseRelative = !!importerUrl;
if (isBaseRelative) {
for (let i = links.length - 1; i >= 0; i--) {
const link2 = links[i];
if (link2.href === dep && (!isCss || link2.rel === \\"stylesheet\\")) {
return;
}
}
} else if (document.querySelector(\`link[href=\\"\${dep}\\"]\${cssSelector}\`)) {
return;
}
const link = document.createElement(\\"link\\");
Expand Down
Loading

0 comments on commit ef545f6

Please sign in to comment.