Skip to content

Commit 1bffb0d

Browse files
authored
Merge pull request #16 from michmich112/fix/#15
Release v1.2.3
2 parents 057d661 + e88ebbd commit 1bffb0d

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,10 @@ async function removeInlineScripts(directory, log) {
118118
const f = readFileSync(file);
119119
const $ = load(f.toString());
120120
const node = $('script[type="module"]').get()[0];
121+
121122
if (!node) return;
123+
if (Object.keys(node.attribs).includes("src")) return; // if there is a src, it's not an inline script
124+
122125
const attribs = Object.keys(node.attribs).reduce(
123126
(a, c) => a + `${c}="${node.attribs[c]}" `,
124127
""

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sveltekit-adapter-chrome-extension",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/michmich112/sveltekit-adapter-chrome-extension"

0 commit comments

Comments
 (0)