neo.mjs 4.0.61 → 4.0.62
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 +1 -1
- package/src/DefaultConfig.mjs +4 -1
- package/src/Main.mjs +5 -1
package/package.json
CHANGED
package/src/DefaultConfig.mjs
CHANGED
@@ -98,7 +98,10 @@ const DefaultConfig = {
|
|
98
98
|
/**
|
99
99
|
* Add addons for the main thread
|
100
100
|
* Possible values: AmCharts, AnalyticsByGoogle, DragDrop, HighlightJS, LocalStorage, MapboxGL, Markdown, Siesta, Stylesheet, WindowPosition
|
101
|
-
* (src/main/addon)
|
101
|
+
* (src/main/addon) contains all framework related options.
|
102
|
+
* You can also create your own addons within your workspace scope. Make sure to put them inside 'src/main/addon/'
|
103
|
+
* and prefix them with 'WS/' inside your neo-config.json file.
|
104
|
+
* Example: ['DragDrop', 'Stylesheet', 'WS/MyAddon']
|
102
105
|
* @default ['DragDrop','Stylesheet']
|
103
106
|
* @memberOf! module:Neo
|
104
107
|
* @name config.mainThreadAddons
|
package/src/Main.mjs
CHANGED
@@ -215,7 +215,11 @@ class Main extends core.Base {
|
|
215
215
|
}
|
216
216
|
|
217
217
|
mainThreadAddons.forEach(addon => {
|
218
|
-
|
218
|
+
if (addon.startsWith('WS/')) {
|
219
|
+
imports.push(import(`../../../src/main/addon/${addon.substr(3)}.mjs`));
|
220
|
+
} else {
|
221
|
+
imports.push(import(`./main/addon/${addon}.mjs`));
|
222
|
+
}
|
219
223
|
});
|
220
224
|
|
221
225
|
modules = await Promise.all(imports);
|