@jsenv/core 27.0.0-alpha.55 → 27.0.0-alpha.56
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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isFileSystemPath,
|
|
3
3
|
normalizeStructuredMetaMap,
|
|
4
|
+
urlIsInsideOf,
|
|
4
5
|
urlToMeta,
|
|
5
6
|
} from "@jsenv/filesystem"
|
|
6
7
|
import { createDetailedMessage } from "@jsenv/logger"
|
|
@@ -8,6 +9,12 @@ import { createDetailedMessage } from "@jsenv/logger"
|
|
|
8
9
|
import { applyRollupPlugins } from "@jsenv/utils/js_ast/apply_rollup_plugins.js"
|
|
9
10
|
import { sourcemapConverter } from "@jsenv/utils/sourcemap/sourcemap_converter.js"
|
|
10
11
|
import { fileUrlConverter } from "@jsenv/core/src/omega/file_url_converter.js"
|
|
12
|
+
import { babelHelperNameFromUrl } from "@jsenv/babel-plugins"
|
|
13
|
+
|
|
14
|
+
const jsenvBabelPluginDirectoryUrl = new URL(
|
|
15
|
+
"../../transpilation/babel/",
|
|
16
|
+
import.meta.url,
|
|
17
|
+
).href
|
|
11
18
|
|
|
12
19
|
export const bundleJsModule = async ({
|
|
13
20
|
jsModuleUrlInfos,
|
|
@@ -216,6 +223,23 @@ const rollupPluginJsenv = ({
|
|
|
216
223
|
const name = nameFromUrlInfo || `${chunkInfo.name}.js`
|
|
217
224
|
return insideJs ? `js/${name}` : `${name}`
|
|
218
225
|
},
|
|
226
|
+
manualChunks: (id) => {
|
|
227
|
+
const fileUrl = fileUrlConverter.asFileUrl(id)
|
|
228
|
+
if (
|
|
229
|
+
fileUrl.endsWith(
|
|
230
|
+
"babel-plugin-transform-async-to-promises/helpers.mjs",
|
|
231
|
+
)
|
|
232
|
+
) {
|
|
233
|
+
return "babel_helpers"
|
|
234
|
+
}
|
|
235
|
+
if (babelHelperNameFromUrl(fileUrl)) {
|
|
236
|
+
return "babel_helpers"
|
|
237
|
+
}
|
|
238
|
+
if (urlIsInsideOf(fileUrl, jsenvBabelPluginDirectoryUrl)) {
|
|
239
|
+
return "babel_helpers"
|
|
240
|
+
}
|
|
241
|
+
return null
|
|
242
|
+
},
|
|
219
243
|
// https://rollupjs.org/guide/en/#outputpaths
|
|
220
244
|
// paths: (id) => {
|
|
221
245
|
// return id
|