@jsenv/core 41.4.17 → 41.4.18
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 +573 -469
- package/dist/client/directory_listing/js/directory_listing.js +23 -2
- package/dist/start_dev_server/start_dev_server.js +780 -612
- package/package.json +7 -7
- package/src/dev/dev_server_plugins/dev_server_plugin_serve_source_files.js +116 -68
- package/src/dev/start_dev_server.js +24 -4
- package/src/helpers/watch_source_files.js +25 -20
- package/src/kitchen/url_graph/references.js +30 -13
- package/src/kitchen/url_graph/url_graph.js +0 -1
- package/src/plugins/import_meta_css/jsenv_plugin_import_meta_css.js +8 -40
- package/src/plugins/import_meta_hot/import_meta_hot_analysis.js +70 -0
- package/src/plugins/import_meta_hot/jsenv_plugin_import_meta_hot.js +35 -20
- package/src/plugins/import_meta_scenarios/jsenv_plugin_import_meta_scenarios.js +22 -56
- package/src/plugins/modulepreload/jsenv_plugin_modulepreload.js +128 -0
- package/src/plugins/plugins.js +3 -0
- package/src/plugins/protocol_file/client/directory_listing.jsx +27 -1
- package/src/plugins/protocol_file/jsenv_plugin_directory_listing.js +20 -0
- package/src/plugins/protocol_file/jsenv_plugin_fs_redirection.js +32 -15
- package/src/plugins/protocol_file/jsenv_plugin_protocol_file.js +11 -2
- package/src/plugins/resolution_node_esm/node_esm_resolver.js +0 -5
- package/src/plugins/import_meta_hot/babel_plugin_metadata_import_meta_hot.js +0 -97
|
@@ -46,10 +46,27 @@ const DirectoryListing = () => {
|
|
|
46
46
|
const ErrorMessage = () => {
|
|
47
47
|
const {
|
|
48
48
|
filePathExisting,
|
|
49
|
-
filePathNotFound
|
|
49
|
+
filePathNotFound,
|
|
50
|
+
spaFallbackFilePaths
|
|
50
51
|
} = enoentDetails;
|
|
51
52
|
let errorText;
|
|
52
53
|
let errorSuggestion;
|
|
54
|
+
let spaExplanation = null;
|
|
55
|
+
if (spaFallbackFilePaths) {
|
|
56
|
+
spaExplanation = u($, {
|
|
57
|
+
children: [u("strong", {
|
|
58
|
+
children: "SPA mode:"
|
|
59
|
+
}), " a url without extension is a route, served with the closest html file. None of these exists:", u("ul", {
|
|
60
|
+
className: "spa_fallback_list",
|
|
61
|
+
style: "margin: 6px 0 0; padding-left: 20px;",
|
|
62
|
+
children: spaFallbackFilePaths.map(filePath => u("li", {
|
|
63
|
+
children: [u("code", {
|
|
64
|
+
children: filePath
|
|
65
|
+
}), filePath === `/${mainFilePath}` ? " (main file)" : ""]
|
|
66
|
+
}, filePath))
|
|
67
|
+
})]
|
|
68
|
+
});
|
|
69
|
+
}
|
|
53
70
|
errorText = u($, {
|
|
54
71
|
children: [u("strong", {
|
|
55
72
|
children: "File not found:"
|
|
@@ -79,7 +96,11 @@ const ErrorMessage = () => {
|
|
|
79
96
|
children: [u("p", {
|
|
80
97
|
className: "error_text",
|
|
81
98
|
children: errorText
|
|
82
|
-
}), u("p", {
|
|
99
|
+
}), spaExplanation ? u("p", {
|
|
100
|
+
className: "error_spa",
|
|
101
|
+
style: "margin-top: 10px;",
|
|
102
|
+
children: spaExplanation
|
|
103
|
+
}) : null, u("p", {
|
|
83
104
|
className: "error_suggestion",
|
|
84
105
|
style: "font-size: 0.8em; margin-top: 10px;",
|
|
85
106
|
children: errorSuggestion
|