@jsenv/core 41.3.0 → 41.4.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/build/build.js +258 -0
- package/dist/js/dependency_status.js +61 -0
- package/dist/start_dev_server/jsenv_core_packages.js +262 -10
- package/dist/start_dev_server/start_dev_server.js +467 -23
- package/package.json +6 -6
- package/src/dev/dev_server_plugins/dev_server_plugin_serve_source_files.js +42 -21
- package/src/dev/start_dev_server.js +28 -0
- package/src/helpers/watch_dependencies.js +110 -0
- package/src/kitchen/errors.js +43 -0
- package/src/kitchen/package_dependencies.js +160 -0
- package/src/plugins/autoreload/jsenv_plugin_autoreload.js +2 -0
- package/src/plugins/autoreload/jsenv_plugin_autoreload_server.js +10 -0
- package/src/plugins/dependency_status/client/dependency_status.js +59 -0
- package/src/plugins/dependency_status/jsenv_plugin_dependency_status.js +64 -0
- package/src/plugins/plugins.js +5 -0
- package/src/plugins/workspace_bundle/jsenv_plugin_workspace_bundle.js +10 -0
|
@@ -41,6 +41,16 @@ export const jsenvPluginWorkspaceBundle = ({ packageDirectory }) => {
|
|
|
41
41
|
// root package, we don't want to bundle
|
|
42
42
|
return null;
|
|
43
43
|
}
|
|
44
|
+
if (reference.type !== "js_import") {
|
|
45
|
+
// Only consolidate ES imports of a workspace package into its single
|
|
46
|
+
// bundle. Other reference kinds are their own entry points — most
|
|
47
|
+
// importantly an HTML <script src> pointing at a package file (jsenv
|
|
48
|
+
// injects its own client scripts that way: server events, the client
|
|
49
|
+
// monitoring reporter, custom-elements-redefine…). Redirecting those to
|
|
50
|
+
// the package main would run the wrong module, and for @jsenv/core the
|
|
51
|
+
// main is node-only code (node:url) that cannot be served to a browser.
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
44
54
|
// we make sure we target the bundle version of the package
|
|
45
55
|
// otherwise we might execute some parts of the package code multiple times.
|
|
46
56
|
// so we need to redirect the potential reference to non entry point to the package main entry point
|