adt-js-components 1.1.2 → 1.1.3

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/README.md CHANGED
@@ -39,6 +39,17 @@ export default { run };
39
39
  AdtJsComponents.init('example-form', 'Components/Forms/ExampleForm');
40
40
  ```
41
41
 
42
+ 6. Example of `resolve` in your project `webpack.config.js`, if all applications js modules are relatively to `app`.
43
+
44
+ ```
45
+ resolve: {
46
+ modules: ['node_modules'],
47
+ alias: {
48
+ JsComponents: path.resolve(__dirname, 'app')
49
+ }
50
+ }
51
+ ```
52
+
42
53
 
43
54
  ## Predefined components
44
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adt-js-components",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "JavaScript components for Nette framework",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -20,7 +20,7 @@ const init = (selector, path) => {
20
20
  loadedComponents.push(path);
21
21
 
22
22
  if (path.includes('/')) {
23
- import(path + '/index.js').then(component => {
23
+ import('JsComponents/' + path + '/index.js').then(component => {
24
24
  component.default.run(componentsConfig[selector] || {});
25
25
  });
26
26