@jsenv/core 23.8.1 → 23.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -137,6 +137,7 @@ const transformHTMLSourceFile = async ({
|
|
|
137
137
|
pushResponse,
|
|
138
138
|
inlineImportMapIntoHTML,
|
|
139
139
|
jsenvScriptInjection,
|
|
140
|
+
jsenvToolbarInjection,
|
|
140
141
|
onInlineModuleScript = () => {},
|
|
141
142
|
}) => {
|
|
142
143
|
const htmlAst = parseHtmlString(fileContent)
|
|
@@ -166,13 +167,13 @@ const transformHTMLSourceFile = async ({
|
|
|
166
167
|
},
|
|
167
168
|
]
|
|
168
169
|
: []),
|
|
169
|
-
...(fileUrl
|
|
170
|
-
? [
|
|
171
|
-
: [
|
|
170
|
+
...(fileUrl !== jsenvToolbarHtmlFileInfo.url && jsenvToolbarInjection
|
|
171
|
+
? [
|
|
172
172
|
{
|
|
173
173
|
src: `/${jsenvToolbarInjectorBuildRelativeUrlForProject}`,
|
|
174
174
|
},
|
|
175
|
-
]
|
|
175
|
+
]
|
|
176
|
+
: []),
|
|
176
177
|
],
|
|
177
178
|
})
|
|
178
179
|
|
|
@@ -45,6 +45,9 @@ export const compileHtml = async ({
|
|
|
45
45
|
babelPluginMap,
|
|
46
46
|
|
|
47
47
|
sourcemapMethod,
|
|
48
|
+
|
|
49
|
+
jsenvScriptInjection = true,
|
|
50
|
+
jsenvToolbarInjection,
|
|
48
51
|
}) => {
|
|
49
52
|
const jsenvBrowserBuildUrlRelativeToProject = urlToRelativeUrl(
|
|
50
53
|
jsenvBrowserSystemFileInfo.jsenvBuildUrl,
|
|
@@ -62,19 +65,24 @@ export const compileHtml = async ({
|
|
|
62
65
|
await mutateRessourceHints(htmlAst)
|
|
63
66
|
}
|
|
64
67
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
manipulateHtmlAst(htmlAst, {
|
|
69
|
+
scriptInjections: [
|
|
70
|
+
...(url !== jsenvToolbarHtmlFileInfo.url && jsenvScriptInjection
|
|
71
|
+
? [
|
|
72
|
+
{
|
|
73
|
+
src: `/${jsenvBrowserBuildUrlRelativeToProject}`,
|
|
74
|
+
},
|
|
75
|
+
]
|
|
76
|
+
: []),
|
|
77
|
+
...(url !== jsenvToolbarHtmlFileInfo.url && jsenvToolbarInjection
|
|
78
|
+
? [
|
|
79
|
+
{
|
|
80
|
+
src: `/${jsenvToolbarInjectorBuildRelativeUrlForProject}`,
|
|
81
|
+
},
|
|
82
|
+
]
|
|
83
|
+
: []),
|
|
84
|
+
],
|
|
85
|
+
})
|
|
78
86
|
|
|
79
87
|
const { scripts } = parseHtmlAstRessources(htmlAst)
|
|
80
88
|
const htmlDependencies = collectHtmlDependenciesFromAst(htmlAst)
|