@jsenv/core 31.1.3 → 31.2.0

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/main.js CHANGED
@@ -10175,6 +10175,17 @@ const parseAndTransformWebmanifestUrls = async (urlInfo, context) => {
10175
10175
  const content = urlInfo.content;
10176
10176
  const manifest = JSON.parse(content);
10177
10177
  const actions = [];
10178
+ const {
10179
+ start_url
10180
+ } = manifest;
10181
+ if (start_url) {
10182
+ if (context.build) {
10183
+ manifest.start_url = "/";
10184
+ } else {
10185
+ const parentUrl = context.reference.parentUrl;
10186
+ manifest.start_url = `${parentUrl.slice(context.rootDirectoryUrl.length)}`;
10187
+ }
10188
+ }
10178
10189
  const {
10179
10190
  icons = []
10180
10191
  } = manifest;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "31.1.3",
3
+ "version": "31.2.0",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -74,7 +74,7 @@
74
74
  "@jsenv/integrity": "0.0.1",
75
75
  "@jsenv/log": "3.3.4",
76
76
  "@jsenv/node-esm-resolution": "1.0.1",
77
- "@jsenv/plugin-bundling": "2.0.1",
77
+ "@jsenv/plugin-bundling": "2.1.0",
78
78
  "@jsenv/server": "15.0.0",
79
79
  "@jsenv/sourcemap": "1.0.9",
80
80
  "@jsenv/uneval": "1.6.0",
@@ -2,6 +2,15 @@ export const parseAndTransformWebmanifestUrls = async (urlInfo, context) => {
2
2
  const content = urlInfo.content
3
3
  const manifest = JSON.parse(content)
4
4
  const actions = []
5
+ const { start_url } = manifest
6
+ if (start_url) {
7
+ if (context.build) {
8
+ manifest.start_url = "/"
9
+ } else {
10
+ const parentUrl = context.reference.parentUrl
11
+ manifest.start_url = `${parentUrl.slice(context.rootDirectoryUrl.length)}`
12
+ }
13
+ }
5
14
  const { icons = [] } = manifest
6
15
  icons.forEach((icon) => {
7
16
  const [reference] = context.referenceUtils.found({
@@ -12,6 +21,7 @@ export const parseAndTransformWebmanifestUrls = async (urlInfo, context) => {
12
21
  icon.src = await context.referenceUtils.readGeneratedSpecifier(reference)
13
22
  })
14
23
  })
24
+
15
25
  if (actions.length === 0) {
16
26
  return null
17
27
  }