@salesforce/vite-plugin-webapp-experimental 1.103.2 → 1.103.4
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/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -6
- package/package.json +2 -2
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAqB,MAAM,EAAiB,MAAM,MAAM,CAAC;AAUrE,MAAM,WAAW,aAAa;IAC7B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAID,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,OAAO,GAAE,aAAkB,GAAG,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAqB,MAAM,EAAiB,MAAM,MAAM,CAAC;AAUrE,MAAM,WAAW,aAAa;IAC7B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;CAClC;AAID,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,OAAO,GAAE,aAAkB,GAAG,MAAM,EAAE,CAgQ3E"}
|
package/dist/index.js
CHANGED
|
@@ -201,21 +201,24 @@ function webappsPlugin(options = {}) {
|
|
|
201
201
|
},
|
|
202
202
|
transformIndexHtml: {
|
|
203
203
|
order: "pre",
|
|
204
|
-
handler() {
|
|
205
|
-
|
|
204
|
+
handler(html) {
|
|
205
|
+
if (environment) {
|
|
206
|
+
html = injectLivePreviewScript(html);
|
|
207
|
+
}
|
|
208
|
+
const tags = [];
|
|
206
209
|
if (environment) {
|
|
207
|
-
|
|
210
|
+
tags.push({
|
|
208
211
|
tag: "base",
|
|
209
212
|
attrs: { href: environment.basePath },
|
|
210
213
|
injectTo: "head-prepend"
|
|
211
214
|
});
|
|
212
|
-
|
|
215
|
+
tags.push({
|
|
213
216
|
tag: "script",
|
|
214
217
|
children: `(function() { globalThis.SFDC_ENV = { basePath: "${environment.basePath}", apiPath: "${environment.apiPath}" }; })();`,
|
|
215
218
|
injectTo: "body"
|
|
216
219
|
});
|
|
217
220
|
}
|
|
218
|
-
return
|
|
221
|
+
return { html, tags };
|
|
219
222
|
}
|
|
220
223
|
}
|
|
221
224
|
};
|
|
@@ -284,7 +287,6 @@ function webappsPlugin(options = {}) {
|
|
|
284
287
|
transformIndexHtml: {
|
|
285
288
|
order: "pre",
|
|
286
289
|
handler(html) {
|
|
287
|
-
html = injectLivePreviewScript(html);
|
|
288
290
|
const tags = [];
|
|
289
291
|
if (designModeEnabled) {
|
|
290
292
|
tags.push({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/vite-plugin-webapp-experimental",
|
|
3
3
|
"description": "[experimental] Vite plugin for Salesforce Web Applications",
|
|
4
|
-
"version": "1.103.
|
|
4
|
+
"version": "1.103.4",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.js",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@babel/core": "^7.28.4",
|
|
30
30
|
"@babel/helper-plugin-utils": "^7.28.3",
|
|
31
|
-
"@salesforce/webapp-experimental": "^1.103.
|
|
31
|
+
"@salesforce/webapp-experimental": "^1.103.4"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/babel__core": "^7.20.5",
|