@zohodesk/react-cli 1.1.22-exp.2 → 1.1.22-exp.4

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": "@zohodesk/react-cli",
3
- "version": "1.1.22-exp.2",
3
+ "version": "1.1.22-exp.4",
4
4
  "description": "A CLI tool for build modern web application and libraries",
5
5
  "scripts": {
6
6
  "init": "node ./lib/utils/init.js",
@@ -110,7 +110,8 @@
110
110
  "webpack-dev-middleware": "3.7.2",
111
111
  "ws": "7.3.1",
112
112
  "xhr2": "0.2.0",
113
- "xmlhttprequest": "1.8.0"
113
+ "xmlhttprequest": "1.8.0",
114
+ "babel-plugin-module-resolver": "5.0.2"
114
115
  },
115
116
  "babel": {
116
117
  "presets": [
@@ -1,23 +0,0 @@
1
- "use strict";
2
-
3
- var _getOptions = _interopRequireDefault(require("./getOptions"));
4
-
5
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
6
-
7
- const options = (0, _getOptions.default)();
8
- const alias = options.app.alias;
9
-
10
- module.exports = () => ({
11
- visitor: {
12
- ImportDeclaration(path) {
13
- const source = path.node.source.value;
14
- const aliasName = Object.keys(alias);
15
- aliasName.forEach(name => {
16
- if (source.includes(name)) {
17
- path.node.source.value = source.replace(name, alias[name]);
18
- }
19
- });
20
- }
21
-
22
- }
23
- });