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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "4.0.61",
3
+ "version": "4.0.62",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -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
- imports.push(import(`./main/addon/${addon}.mjs`));
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);