react-cosmos 5.6.6 → 5.7.1
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/bin/cosmos-export.js +1 -1
- package/bin/cosmos-native.js +1 -1
- package/bin/cosmos.js +1 -1
- package/dist/config/createCosmosConfig.js +4 -4
- package/dist/config/{resolve.d.ts → resolveModule.d.ts} +0 -0
- package/dist/config/{resolve.js → resolveModule.js} +0 -0
- package/dist/{shared/devServer → devServer}/app.d.ts +2 -2
- package/dist/{shared/devServer → devServer}/app.js +2 -2
- package/dist/{shared/devServer → devServer}/httpServer.d.ts +2 -2
- package/dist/{shared/devServer → devServer}/httpServer.js +0 -0
- package/dist/{shared/devServer → devServer}/messageHandler.d.ts +0 -0
- package/dist/{shared/devServer → devServer}/messageHandler.js +0 -0
- package/dist/{shared/devServer/index.d.ts → devServer/startDevServer.d.ts} +2 -2
- package/dist/{shared/devServer/index.js → devServer/startDevServer.js} +5 -5
- package/dist/dom/DomFixtureLoader.d.ts +4 -3
- package/dist/dom/ErrorCatch.js +4 -4
- package/dist/dom/index.d.ts +3 -3
- package/dist/dom/renderMessage.d.ts +1 -0
- package/dist/{shared/export.d.ts → export/generateExport.d.ts} +1 -1
- package/dist/{shared/export.js → export/generateExport.js} +7 -7
- package/dist/fixture.js +6 -6
- package/dist/{webExport.d.ts → generateWebExport.d.ts} +0 -0
- package/dist/{webExport.js → generateWebExport.js} +2 -2
- package/dist/getFixtureUrls.d.ts +1 -1
- package/dist/getFixtureUrls.js +11 -12
- package/dist/getFixtures.d.ts +1 -1
- package/dist/getFixtures.js +14 -15
- package/dist/getFixtures2.d.ts +1 -1
- package/dist/getFixtures2.js +9 -9
- package/dist/index.d.ts +3 -1
- package/dist/index.js +22 -18
- package/dist/native/NativeFixtureLoader.d.ts +12 -0
- package/dist/{native.js → native/NativeFixtureLoader.js} +5 -7
- package/dist/native/index.d.ts +1 -0
- package/dist/native/index.js +25 -0
- package/dist/plugins/httpProxy.d.ts +1 -1
- package/dist/plugins/httpProxy.js +1 -1
- package/dist/plugins/openFile.d.ts +1 -1
- package/dist/plugins/openFile.js +3 -3
- package/dist/plugins/userDepsFile.d.ts +1 -1
- package/dist/plugins/userDepsFile.js +6 -4
- package/dist/plugins/webpack/client/errorOverlay/reactErrorOverlay.js +2 -2
- package/dist/plugins/webpack/client/userDeps.d.ts +3 -3
- package/dist/plugins/webpack/client/userDeps.js +1 -1
- package/dist/plugins/webpack/cosmosConfig/dom.d.ts +1 -1
- package/dist/plugins/webpack/cosmosConfig/webpack.d.ts +1 -1
- package/dist/plugins/webpack/cosmosConfig/webpack.js +5 -5
- package/dist/plugins/webpack/devServer.d.ts +1 -1
- package/dist/plugins/webpack/devServer.js +7 -7
- package/dist/plugins/webpack/export.d.ts +1 -1
- package/dist/plugins/webpack/export.js +10 -6
- package/dist/plugins/webpack/webpackConfig/{default.d.ts → getDefaultWebpackConfig.d.ts} +0 -0
- package/dist/plugins/webpack/webpackConfig/{default.js → getDefaultWebpackConfig.js} +4 -4
- package/dist/plugins/webpack/webpackConfig/{devServer.d.ts → getDevWebpackConfig.d.ts} +1 -1
- package/dist/plugins/webpack/webpackConfig/{devServer.js → getDevWebpackConfig.js} +18 -17
- package/dist/plugins/webpack/webpackConfig/{export.d.ts → getExportWebpackConfig.d.ts} +1 -1
- package/dist/plugins/webpack/webpackConfig/{export.js → getExportWebpackConfig.js} +19 -18
- package/dist/plugins/webpack/webpackConfig/getUserWebpackConfig.d.ts +3 -0
- package/dist/plugins/webpack/webpackConfig/getUserWebpackConfig.js +136 -0
- package/dist/plugins/webpack/webpackConfig/getWebpackConfigModule.d.ts +2 -0
- package/dist/plugins/webpack/webpackConfig/getWebpackConfigModule.js +45 -0
- package/dist/plugins/webpack/webpackConfig/getWebpackConfigResolve.d.ts +4 -0
- package/dist/plugins/webpack/webpackConfig/getWebpackConfigResolve.js +107 -0
- package/dist/plugins/webpack/webpackConfig/getWebpackNodeEnv.d.ts +1 -0
- package/dist/plugins/webpack/webpackConfig/getWebpackNodeEnv.js +12 -0
- package/dist/plugins/webpack/webpackConfig/htmlPlugin.d.ts +1 -1
- package/dist/plugins/webpack/webpackConfig/htmlPlugin.js +5 -5
- package/dist/plugins/webpack/webpackConfig/plugins.d.ts +5 -0
- package/dist/plugins/webpack/webpackConfig/plugins.js +37 -0
- package/dist/plugins/webpack/webpackConfig/resolveWebpackClientPath.d.ts +1 -0
- package/dist/plugins/webpack/webpackConfig/resolveWebpackClientPath.js +10 -0
- package/dist/plugins/webpack/webpackConfig/userDepsLoader.js +4 -4
- package/dist/shared/fs.js +3 -3
- package/dist/shared/playgroundHtml.d.ts +2 -2
- package/dist/shared/playgroundHtml.js +6 -6
- package/dist/shared/pluginConfigs.d.ts +1 -1
- package/dist/shared/static.js +2 -2
- package/dist/shared/types.d.ts +1 -0
- package/dist/shared/types.js +5 -0
- package/dist/shared/{shared.d.ts → utils.d.ts} +0 -1
- package/dist/shared/{shared.js → utils.js} +2 -2
- package/dist/{nativeServer.d.ts → startNativeServer.d.ts} +0 -0
- package/dist/{nativeServer.js → startNativeServer.js} +3 -3
- package/dist/{webServer.d.ts → startWebServer.d.ts} +0 -0
- package/dist/{webServer.js → startWebServer.js} +3 -3
- package/dist/{shared/userDeps → userDeps}/findUserModulePaths.d.ts +0 -0
- package/dist/{shared/userDeps → userDeps}/findUserModulePaths.js +0 -0
- package/dist/{shared/userDeps → userDeps}/generateUserDepsModule.d.ts +1 -1
- package/dist/{shared/userDeps → userDeps}/generateUserDepsModule.js +0 -0
- package/dist/userDeps/getUserModules.d.ts +8 -0
- package/dist/{shared/userDeps → userDeps}/getUserModules.js +6 -6
- package/dist/{shared/userDeps → userDeps}/shared.d.ts +0 -0
- package/dist/{shared/userDeps → userDeps}/shared.js +3 -3
- package/dist/{shared/userDeps → userDeps}/userDepsTemplate.d.ts +0 -0
- package/dist/{shared/userDeps → userDeps}/userDepsTemplate.js +3 -3
- package/package.json +12 -12
- package/dist/config/index.d.ts +0 -5
- package/dist/config/index.js +0 -51
- package/dist/native.d.ts +0 -9
- package/dist/plugins/webpack/webpackConfig/index.d.ts +0 -2
- package/dist/plugins/webpack/webpackConfig/index.js +0 -21
- package/dist/plugins/webpack/webpackConfig/module.d.ts +0 -3
- package/dist/plugins/webpack/webpackConfig/module.js +0 -18
- package/dist/plugins/webpack/webpackConfig/shared.d.ts +0 -11
- package/dist/plugins/webpack/webpackConfig/shared.js +0 -254
- package/dist/shared/userDeps/getUserModules.d.ts +0 -8
- package/dist/shared/userDeps/index.d.ts +0 -4
- package/dist/shared/userDeps/index.js +0 -49
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getUserWebpackConfig = getUserWebpackConfig;
|
|
7
|
+
|
|
8
|
+
var _path = _interopRequireDefault(require("path"));
|
|
9
|
+
|
|
10
|
+
var _cli = require("../../../shared/cli");
|
|
11
|
+
|
|
12
|
+
var _fs = require("../../../shared/fs");
|
|
13
|
+
|
|
14
|
+
var _webpack = require("../cosmosConfig/webpack");
|
|
15
|
+
|
|
16
|
+
var _getDefaultWebpackConfig = require("./getDefaultWebpackConfig");
|
|
17
|
+
|
|
18
|
+
var _getWebpackNodeEnv = require("./getWebpackNodeEnv");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
23
|
+
|
|
24
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
25
|
+
|
|
26
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
27
|
+
|
|
28
|
+
function getUserWebpackConfig(_x, _x2) {
|
|
29
|
+
return _getUserWebpackConfig.apply(this, arguments);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function _getUserWebpackConfig() {
|
|
33
|
+
_getUserWebpackConfig = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(cosmosConfig, userWebpack) {
|
|
34
|
+
var baseWebpackConfig, _createWebpackCosmosC, overridePath, relPath, webpackOverride;
|
|
35
|
+
|
|
36
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
37
|
+
while (1) {
|
|
38
|
+
switch (_context.prev = _context.next) {
|
|
39
|
+
case 0:
|
|
40
|
+
_context.next = 2;
|
|
41
|
+
return getBaseWebpackConfig(cosmosConfig, userWebpack);
|
|
42
|
+
|
|
43
|
+
case 2:
|
|
44
|
+
baseWebpackConfig = _context.sent;
|
|
45
|
+
_createWebpackCosmosC = (0, _webpack.createWebpackCosmosConfig)(cosmosConfig), overridePath = _createWebpackCosmosC.overridePath;
|
|
46
|
+
|
|
47
|
+
if (!(!overridePath || !(0, _fs.moduleExists)(overridePath))) {
|
|
48
|
+
_context.next = 6;
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
return _context.abrupt("return", baseWebpackConfig);
|
|
53
|
+
|
|
54
|
+
case 6:
|
|
55
|
+
relPath = _path.default.relative(process.cwd(), overridePath);
|
|
56
|
+
console.log("[Cosmos] Overriding webpack config at ".concat(relPath));
|
|
57
|
+
webpackOverride = getDefaultExport((0, _fs.requireModule)(overridePath));
|
|
58
|
+
return _context.abrupt("return", webpackOverride(baseWebpackConfig, (0, _getWebpackNodeEnv.getWebpackNodeEnv)()));
|
|
59
|
+
|
|
60
|
+
case 10:
|
|
61
|
+
case "end":
|
|
62
|
+
return _context.stop();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}, _callee);
|
|
66
|
+
}));
|
|
67
|
+
return _getUserWebpackConfig.apply(this, arguments);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function getBaseWebpackConfig(_x3, _x4) {
|
|
71
|
+
return _getBaseWebpackConfig.apply(this, arguments);
|
|
72
|
+
} // Get "default" export from either an ES or CJS module
|
|
73
|
+
// More context: https://github.com/react-cosmos/react-cosmos/issues/895
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
function _getBaseWebpackConfig() {
|
|
77
|
+
_getBaseWebpackConfig = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(cosmosConfig, userWebpack) {
|
|
78
|
+
var rootDir, _createWebpackCosmosC2, configPath, relPath, userConfigExport, cliArgs;
|
|
79
|
+
|
|
80
|
+
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
81
|
+
while (1) {
|
|
82
|
+
switch (_context2.prev = _context2.next) {
|
|
83
|
+
case 0:
|
|
84
|
+
rootDir = cosmosConfig.rootDir;
|
|
85
|
+
_createWebpackCosmosC2 = (0, _webpack.createWebpackCosmosConfig)(cosmosConfig), configPath = _createWebpackCosmosC2.configPath;
|
|
86
|
+
|
|
87
|
+
if (!(!configPath || !(0, _fs.moduleExists)(configPath))) {
|
|
88
|
+
_context2.next = 5;
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
console.log('[Cosmos] Using default webpack config');
|
|
93
|
+
return _context2.abrupt("return", (0, _getDefaultWebpackConfig.getDefaultWebpackConfig)(userWebpack, rootDir));
|
|
94
|
+
|
|
95
|
+
case 5:
|
|
96
|
+
relPath = _path.default.relative(process.cwd(), configPath);
|
|
97
|
+
console.log("[Cosmos] Using webpack config found at ".concat(relPath));
|
|
98
|
+
userConfigExport = getDefaultExport((0, _fs.requireModule)(configPath));
|
|
99
|
+
cliArgs = (0, _cli.getCliArgs)();
|
|
100
|
+
|
|
101
|
+
if (!(typeof userConfigExport === 'function')) {
|
|
102
|
+
_context2.next = 15;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
_context2.next = 12;
|
|
107
|
+
return userConfigExport(cliArgs.env || (0, _getWebpackNodeEnv.getWebpackNodeEnv)(), cliArgs);
|
|
108
|
+
|
|
109
|
+
case 12:
|
|
110
|
+
_context2.t0 = _context2.sent;
|
|
111
|
+
_context2.next = 16;
|
|
112
|
+
break;
|
|
113
|
+
|
|
114
|
+
case 15:
|
|
115
|
+
_context2.t0 = userConfigExport;
|
|
116
|
+
|
|
117
|
+
case 16:
|
|
118
|
+
return _context2.abrupt("return", _context2.t0);
|
|
119
|
+
|
|
120
|
+
case 17:
|
|
121
|
+
case "end":
|
|
122
|
+
return _context2.stop();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}, _callee2);
|
|
126
|
+
}));
|
|
127
|
+
return _getBaseWebpackConfig.apply(this, arguments);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
function getDefaultExport(module) {
|
|
131
|
+
if (_typeof(module) === 'object' && 'default' in module) {
|
|
132
|
+
return module.default;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
return module;
|
|
136
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getWebpackConfigModule = getWebpackConfigModule;
|
|
7
|
+
|
|
8
|
+
var _resolveWebpackClientPath = require("./resolveWebpackClientPath");
|
|
9
|
+
|
|
10
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
|
+
|
|
12
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
|
|
14
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
+
|
|
16
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
17
|
+
|
|
18
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
|
+
|
|
20
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
21
|
+
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
+
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
+
|
|
26
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
+
|
|
28
|
+
function getWebpackConfigModule(webpackConfig) {
|
|
29
|
+
return _objectSpread(_objectSpread({}, webpackConfig.module), {}, {
|
|
30
|
+
rules: getRules(webpackConfig)
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function getRules(_ref) {
|
|
35
|
+
var module = _ref.module;
|
|
36
|
+
var existingRules = module && module.rules || [];
|
|
37
|
+
return [].concat(_toConsumableArray(existingRules), [getUserDepsLoaderRule()]);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function getUserDepsLoaderRule() {
|
|
41
|
+
return {
|
|
42
|
+
loader: require.resolve('./userDepsLoader'),
|
|
43
|
+
include: (0, _resolveWebpackClientPath.resolveWebpackClientPath)('userDeps')
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import webpack from 'webpack';
|
|
2
|
+
import { CosmosConfig } from '../../../config/shared';
|
|
3
|
+
export declare function getWebpackConfigResolve(cosmosConfig: CosmosConfig, webpackConfig: webpack.Configuration): webpack.ResolveOptions;
|
|
4
|
+
export declare function isInstanceOfResolvePlugin(plugin: webpack.ResolvePluginInstance | '...', constructorName: string): boolean;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getWebpackConfigResolve = getWebpackConfigResolve;
|
|
7
|
+
exports.isInstanceOfResolvePlugin = isInstanceOfResolvePlugin;
|
|
8
|
+
|
|
9
|
+
var _path = _interopRequireDefault(require("path"));
|
|
10
|
+
|
|
11
|
+
var _resolveFrom = _interopRequireDefault(require("resolve-from"));
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
16
|
+
|
|
17
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
+
|
|
19
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
20
|
+
|
|
21
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
22
|
+
|
|
23
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
24
|
+
|
|
25
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
26
|
+
|
|
27
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28
|
+
|
|
29
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
30
|
+
|
|
31
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
32
|
+
|
|
33
|
+
function getWebpackConfigResolve(cosmosConfig, webpackConfig) {
|
|
34
|
+
return removeModuleScopePlugin(resolveLocalReactDeps(cosmosConfig, webpackConfig.resolve));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function removeModuleScopePlugin() {
|
|
38
|
+
var resolve = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
39
|
+
var plugins = resolve.plugins;
|
|
40
|
+
if (!plugins) return resolve;
|
|
41
|
+
return _objectSpread(_objectSpread({}, resolve), {}, {
|
|
42
|
+
plugins: plugins.filter(function (p) {
|
|
43
|
+
return !isInstanceOfResolvePlugin(p, 'ModuleScopePlugin');
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function resolveLocalReactDeps(cosmosConfig) {
|
|
49
|
+
var resolve = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
50
|
+
var rootDir = cosmosConfig.rootDir;
|
|
51
|
+
var alias = resolve.alias || {}; // Preserve existing React aliases (eg. when using Preact)
|
|
52
|
+
|
|
53
|
+
var reactAlias = hasAlias(alias, 'react');
|
|
54
|
+
var reactDomAlias = hasAlias(alias, 'react-dom');
|
|
55
|
+
|
|
56
|
+
if (reactAlias && reactDomAlias) {
|
|
57
|
+
console.log('[Cosmos] React and React DOM aliases found in webpack config');
|
|
58
|
+
return resolve;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (reactAlias) {
|
|
62
|
+
console.log('[Cosmos] React alias found in webpack config');
|
|
63
|
+
} else {
|
|
64
|
+
var reactPath = _resolveFrom.default.silent(rootDir, 'react');
|
|
65
|
+
|
|
66
|
+
if (!reactPath) throw new Error("[Cosmos] Local dependency not found: react");
|
|
67
|
+
alias = addAlias(alias, 'react', _path.default.dirname(reactPath));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (reactDomAlias) {
|
|
71
|
+
console.log('[Cosmos] React DOM alias found in webpack config');
|
|
72
|
+
} else {
|
|
73
|
+
var reactDomPath = _resolveFrom.default.silent(rootDir, 'react-dom');
|
|
74
|
+
|
|
75
|
+
if (!reactDomPath) throw new Error("[Cosmos] Local dependency not found: react-dom");
|
|
76
|
+
alias = addAlias(alias, 'react-dom', _path.default.dirname(reactDomPath));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return _objectSpread(_objectSpread({}, resolve), {}, {
|
|
80
|
+
alias: alias
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function hasAlias(alias, name) {
|
|
85
|
+
if (!alias) return false;
|
|
86
|
+
var exactName = "".concat(name, "$");
|
|
87
|
+
|
|
88
|
+
if (Array.isArray(alias)) {
|
|
89
|
+
return alias.some(function (a) {
|
|
90
|
+
return a.name === name || a.name === exactName;
|
|
91
|
+
});
|
|
92
|
+
} else {
|
|
93
|
+
var keys = Object.keys(alias);
|
|
94
|
+
return keys.includes(name) || keys.includes(exactName);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function addAlias(alias, name, value) {
|
|
99
|
+
return Array.isArray(alias) ? [].concat(_toConsumableArray(alias), [{
|
|
100
|
+
name: name,
|
|
101
|
+
alias: value
|
|
102
|
+
}]) : _objectSpread(_objectSpread({}, alias), {}, _defineProperty({}, name, value));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function isInstanceOfResolvePlugin(plugin, constructorName) {
|
|
106
|
+
return plugin.constructor && plugin.constructor.name === constructorName;
|
|
107
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getWebpackNodeEnv(): "production" | "development";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getWebpackNodeEnv = getWebpackNodeEnv;
|
|
7
|
+
|
|
8
|
+
function getWebpackNodeEnv() {
|
|
9
|
+
// Disallow non dev/prod environments, like "test" inside Jest, because
|
|
10
|
+
// they are not supported by webpack
|
|
11
|
+
return process.env.NODE_ENV === 'production' ? 'production' : 'development';
|
|
12
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Options as HtmlWebpackPluginOptions } from 'html-webpack-plugin';
|
|
2
2
|
import webpack from 'webpack';
|
|
3
|
-
import { CosmosConfig } from '../../../config';
|
|
3
|
+
import { CosmosConfig } from '../../../config/shared';
|
|
4
4
|
export declare type HtmlWebpackPlugin = webpack.WebpackPluginInstance & {
|
|
5
5
|
constructor: HtmlWebpackPluginConstructor;
|
|
6
6
|
} & ({
|
|
@@ -12,13 +12,13 @@ var _lodash = require("lodash");
|
|
|
12
12
|
|
|
13
13
|
var _playgroundHtml = require("../../../shared/playgroundHtml");
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _plugins = require("./plugins");
|
|
16
16
|
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
18
|
|
|
19
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
19
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
20
|
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
22
|
|
|
23
23
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
24
24
|
|
|
@@ -37,7 +37,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
37
37
|
function ensureHtmlWebackPlugin(_ref, plugins) {
|
|
38
38
|
var rootDir = _ref.rootDir;
|
|
39
39
|
|
|
40
|
-
if ((0,
|
|
40
|
+
if ((0, _plugins.hasPlugin)(plugins, 'HtmlWebpackPlugin')) {
|
|
41
41
|
return plugins.map(function (plugin) {
|
|
42
42
|
return isHtmlWebpackPlugin(plugin) ? changeHtmlPluginFilename(plugin) : plugin;
|
|
43
43
|
});
|
|
@@ -60,7 +60,7 @@ function getHtmlWebpackPlugin(rootDir) {
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
function isHtmlWebpackPlugin(plugin) {
|
|
63
|
-
return (0,
|
|
63
|
+
return (0, _plugins.isInstanceOfWebpackPlugin)(plugin, 'HtmlWebpackPlugin');
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function changeHtmlPluginFilename(htmlPlugin) {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import webpack from 'webpack';
|
|
2
|
+
import { CosmosConfig } from '../../../config/shared';
|
|
3
|
+
export declare function getGlobalsPlugin({ publicUrl }: CosmosConfig, userWebpack: typeof webpack, devServerOn: boolean): webpack.DefinePlugin;
|
|
4
|
+
export declare function hasPlugin(plugins: void | webpack.WebpackPluginInstance[], pluginName: string): boolean | void;
|
|
5
|
+
export declare function isInstanceOfWebpackPlugin(plugin: webpack.WebpackPluginInstance, constructorName: string): boolean;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getGlobalsPlugin = getGlobalsPlugin;
|
|
7
|
+
exports.hasPlugin = hasPlugin;
|
|
8
|
+
exports.isInstanceOfWebpackPlugin = isInstanceOfWebpackPlugin;
|
|
9
|
+
|
|
10
|
+
var _getWebpackNodeEnv = require("./getWebpackNodeEnv");
|
|
11
|
+
|
|
12
|
+
function getGlobalsPlugin(_ref, userWebpack, devServerOn) {
|
|
13
|
+
var publicUrl = _ref.publicUrl;
|
|
14
|
+
var cleanPublicUrl = removeTrailingSlash(publicUrl);
|
|
15
|
+
return new userWebpack.DefinePlugin({
|
|
16
|
+
// "if (__DEV__)" blocks get stripped when compiling a static export build
|
|
17
|
+
__DEV__: JSON.stringify(devServerOn),
|
|
18
|
+
'process.env': {
|
|
19
|
+
NODE_ENV: JSON.stringify((0, _getWebpackNodeEnv.getWebpackNodeEnv)()),
|
|
20
|
+
PUBLIC_URL: JSON.stringify(cleanPublicUrl)
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function hasPlugin(plugins, pluginName) {
|
|
26
|
+
return plugins && plugins.filter(function (p) {
|
|
27
|
+
return isInstanceOfWebpackPlugin(p, pluginName);
|
|
28
|
+
}).length > 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function isInstanceOfWebpackPlugin(plugin, constructorName) {
|
|
32
|
+
return plugin.constructor && plugin.constructor.name === constructorName;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function removeTrailingSlash(url) {
|
|
36
|
+
return url.replace(/\/$/, '');
|
|
37
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function resolveWebpackClientPath(relPath: string): string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _detectCosmosConfig = require("../../../config/detectCosmosConfig");
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _generateUserDepsModule = require("../../../userDeps/generateUserDepsModule");
|
|
6
6
|
|
|
7
7
|
var _dom = require("../cosmosConfig/dom");
|
|
8
8
|
|
|
9
9
|
module.exports = function injectUserDeps() {
|
|
10
10
|
var _this = this;
|
|
11
11
|
|
|
12
|
-
var cosmosConfig = (0,
|
|
12
|
+
var cosmosConfig = (0, _detectCosmosConfig.detectCosmosConfig)(); // This ensures this loader is invalidated whenever a new file is added to or
|
|
13
13
|
// removed from user's project, which in turn triggers react-cosmos-voyager2
|
|
14
14
|
// to detect fixture files and finally update fixture list inside Playground.
|
|
15
15
|
// Note that while this may not be very performant, it's not the equivalent
|
|
@@ -28,7 +28,7 @@ module.exports = function injectUserDeps() {
|
|
|
28
28
|
var rendererConfig = {
|
|
29
29
|
containerQuerySelector: containerQuerySelector
|
|
30
30
|
};
|
|
31
|
-
return (0,
|
|
31
|
+
return (0, _generateUserDepsModule.generateUserDepsModule)({
|
|
32
32
|
cosmosConfig: cosmosConfig,
|
|
33
33
|
rendererConfig: rendererConfig,
|
|
34
34
|
relativeToDir: null
|
package/dist/shared/fs.js
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.requireModule = requireModule;
|
|
7
|
-
exports.moduleExists = moduleExists;
|
|
8
|
-
exports.fileExists = fileExists;
|
|
9
6
|
exports.dirExists = dirExists;
|
|
7
|
+
exports.fileExists = fileExists;
|
|
8
|
+
exports.moduleExists = moduleExists;
|
|
9
|
+
exports.requireModule = requireModule;
|
|
10
10
|
|
|
11
11
|
var _fs = _interopRequireDefault(require("fs"));
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CosmosPluginConfig } from 'react-cosmos-plugin';
|
|
2
|
-
import { CosmosConfig } from '../config';
|
|
3
|
-
import { PlatformType } from './
|
|
2
|
+
import { CosmosConfig } from '../config/shared';
|
|
3
|
+
import { PlatformType } from './types';
|
|
4
4
|
export declare const RENDERER_FILENAME = "_renderer.html";
|
|
5
5
|
export declare function getDevPlaygroundHtml(platformType: PlatformType, cosmosConfig: CosmosConfig, pluginConfigs: CosmosPluginConfig[]): string;
|
|
6
6
|
export declare function getExportPlaygroundHtml(cosmosConfig: CosmosConfig, pluginConfigs: CosmosPluginConfig[]): string;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.RENDERER_FILENAME = void 0;
|
|
6
7
|
exports.getDevPlaygroundHtml = getDevPlaygroundHtml;
|
|
7
8
|
exports.getExportPlaygroundHtml = getExportPlaygroundHtml;
|
|
8
|
-
exports.RENDERER_FILENAME = void 0;
|
|
9
9
|
|
|
10
10
|
var _fs = _interopRequireDefault(require("fs"));
|
|
11
11
|
|
|
@@ -13,15 +13,15 @@ var _pkgUp = _interopRequireDefault(require("pkg-up"));
|
|
|
13
13
|
|
|
14
14
|
var _url = _interopRequireDefault(require("url"));
|
|
15
15
|
|
|
16
|
-
var _shared = require("./shared");
|
|
17
|
-
|
|
18
16
|
var _static = require("./static");
|
|
19
17
|
|
|
18
|
+
var _utils = require("./utils");
|
|
19
|
+
|
|
20
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
21
|
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
23
|
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
25
|
|
|
26
26
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
27
|
|
|
@@ -106,7 +106,7 @@ function getWebRendererUrl(_ref) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
function getPlaygroundHtml(playgroundArgs) {
|
|
109
|
-
return (0,
|
|
109
|
+
return (0, _utils.replaceKeys)(getPlaygroundHtmlTemplate(), {
|
|
110
110
|
__PLAYGROUND_ARGS: JSON.stringify(playgroundArgs)
|
|
111
111
|
});
|
|
112
112
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { CosmosConfig } from '../config';
|
|
1
|
+
import { CosmosConfig } from '../config/shared';
|
|
2
2
|
export declare function getPluginConfigs(cosmosConfig: CosmosConfig): import("react-cosmos-plugin").CosmosPluginConfig[];
|
package/dist/shared/static.js
CHANGED
|
@@ -10,7 +10,7 @@ var _express = _interopRequireDefault(require("express"));
|
|
|
10
10
|
|
|
11
11
|
var _path = _interopRequireDefault(require("path"));
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _utils = require("./utils");
|
|
14
14
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
|
|
@@ -22,7 +22,7 @@ function serveStaticDir(app, staticPath, publicUrl) {
|
|
|
22
22
|
var relStaticPath = _path.default.relative(process.cwd(), staticPath);
|
|
23
23
|
|
|
24
24
|
console.log("[Cosmos] Serving static files from ".concat(relStaticPath));
|
|
25
|
-
app.use((0,
|
|
25
|
+
app.use((0, _utils.removeLeadingDot)(publicUrl), _express.default.static(staticPath, {
|
|
26
26
|
// Ensure loader index (generated by html-webpack-plugin) loads instead
|
|
27
27
|
// of the index.html from staticPath
|
|
28
28
|
index: false
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type PlatformType = 'web' | 'native';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.replaceKeys = replaceKeys;
|
|
7
|
-
exports.removeLeadingSlash = removeLeadingSlash;
|
|
8
6
|
exports.removeLeadingDot = removeLeadingDot;
|
|
7
|
+
exports.removeLeadingSlash = removeLeadingSlash;
|
|
8
|
+
exports.replaceKeys = replaceKeys;
|
|
9
9
|
|
|
10
10
|
function replaceKeys(str, map) {
|
|
11
11
|
return Object.keys(map).reduce(function (res, key) {
|
|
File without changes
|
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.startNativeServer = startNativeServer;
|
|
7
7
|
|
|
8
|
+
var _startDevServer = require("./devServer/startDevServer");
|
|
9
|
+
|
|
8
10
|
var _openFile = require("./plugins/openFile");
|
|
9
11
|
|
|
10
12
|
var _userDepsFile = require("./plugins/userDepsFile");
|
|
11
13
|
|
|
12
|
-
var _devServer = require("./shared/devServer");
|
|
13
|
-
|
|
14
14
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
15
15
|
|
|
16
16
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -26,7 +26,7 @@ function _startNativeServer() {
|
|
|
26
26
|
switch (_context.prev = _context.next) {
|
|
27
27
|
case 0:
|
|
28
28
|
_context.next = 2;
|
|
29
|
-
return (0,
|
|
29
|
+
return (0, _startDevServer.startDevServer)('native', [_userDepsFile.userDepsFile, _openFile.openFile]);
|
|
30
30
|
|
|
31
31
|
case 2:
|
|
32
32
|
case "end":
|
|
File without changes
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.startWebServer = startWebServer;
|
|
7
7
|
|
|
8
|
+
var _startDevServer = require("./devServer/startDevServer");
|
|
9
|
+
|
|
8
10
|
var _httpProxy = require("./plugins/httpProxy");
|
|
9
11
|
|
|
10
12
|
var _openFile = require("./plugins/openFile");
|
|
@@ -13,8 +15,6 @@ var _userDepsFile = require("./plugins/userDepsFile");
|
|
|
13
15
|
|
|
14
16
|
var _webpack = require("./plugins/webpack");
|
|
15
17
|
|
|
16
|
-
var _devServer = require("./shared/devServer");
|
|
17
|
-
|
|
18
18
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
19
19
|
|
|
20
20
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
@@ -30,7 +30,7 @@ function _startWebServer() {
|
|
|
30
30
|
switch (_context.prev = _context.next) {
|
|
31
31
|
case 0:
|
|
32
32
|
_context.next = 2;
|
|
33
|
-
return (0,
|
|
33
|
+
return (0, _startDevServer.startDevServer)('web', [_openFile.openFile, _webpack.webpackDevServer, _httpProxy.httpProxy, _userDepsFile.userDepsFile]);
|
|
34
34
|
|
|
35
35
|
case 2:
|
|
36
36
|
case "end":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|