@zohodesk/react-cli 1.1.19-exp.6 → 1.1.19-exp.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,7 +28,7 @@ const commonConfig = {
28
28
  // },
29
29
  transformIgnorePatterns: ['/node_modules/(?!(@zohodesk)/)'],
30
30
  // transformIgnorePatterns: ['/node_modules.*?.js$'],
31
- moduleFileExtensions: ['js'],
31
+ moduleFileExtensions: ['js', 'ts', 'tsx'],
32
32
  setupFiles: [(0, _fs.existsSync)(appGlobals) && appGlobals, _path.default.resolve(__dirname, '..', 'jest', 'setup.js')].filter(Boolean),
33
33
  globals: {
34
34
  __DEVELOPMENT__: true,
@@ -52,7 +52,7 @@ module.exports = (...args) => {
52
52
  testPathIgnorePatterns: ['/node_modules/', 'docs'],
53
53
  unmockedModulePathPatterns: ['__tests__', 'node_modules', '.*'],
54
54
  roots: [`<rootDir>/${appFolder}/`],
55
- testRegex: '(/__tests__/.*|\\.(test|spec))\\.(jsx|js|json|node)$',
55
+ testRegex: '(/__tests__/.*|\\.(test|spec))\\.(jsx|js|json|node|ts|tsx)$',
56
56
  testResultsProcessor: _path.default.resolve(__dirname, '..', 'jest', 'result.js')
57
57
  });
58
58
  };
@@ -52,11 +52,12 @@ const {
52
52
  const appPath = process.cwd();
53
53
  const contextURL = disableContextURL ? '' : context;
54
54
  const serverUrl = (0, _utils.getServerURL)(server, 'https');
55
+ console.log(`${[serverUrl, contextURL].filter(a => a).join('/')}`, 'contextURL');
55
56
  const output = {
56
57
  path: _path.default.join(appPath, outputFolder),
57
58
  filename: 'js/[name].js',
58
59
  chunkFilename: 'js/[name].js',
59
- publicPath: `${[serverUrl, contextURL].filter(a => a).join('/')}/`,
60
+ publicPath: `${[serverUrl, contextURL].filter(a => a).join('/')}`,
60
61
  jsonpFunction: `${context}Jsonp`
61
62
  };
62
63
  const nameTemplate = (0, _configsAssetsLoaders.createNameTemplate)(enableChunkHash);
@@ -79,9 +80,13 @@ module.exports = {
79
80
  optimization: {
80
81
  splitChunks: _common.splitChunks,
81
82
  moduleIds: 'named',
82
- runtimeChunk: {
83
- name: entrypoint => changeRuntimeChunkChar ? `./runtime-${entrypoint.name}` : `./runtime~${entrypoint.name}`
84
- }
83
+ runtimeChunk: false // runtimeChunk: {
84
+ // name: entrypoint =>
85
+ // changeRuntimeChunkChar
86
+ // ? `./runtime-${entrypoint.name}`
87
+ // : `./runtime~${entrypoint.name}`
88
+ // }
89
+
85
90
  },
86
91
  plugins: (0, _pluginUtils.getDevPlugins)(options, output.publicPath),
87
92
  module: {
@@ -87,9 +87,13 @@ module.exports = {
87
87
  output,
88
88
  optimization: {
89
89
  splitChunks: _common.splitChunks,
90
- runtimeChunk: {
91
- name: entrypoint => changeRuntimeChunkChar ? `./runtime-${entrypoint.name}` : `./runtime~${entrypoint.name}`
92
- },
90
+ runtimeChunk: false,
91
+ // runtimeChunk: {
92
+ // name: entrypoint =>
93
+ // changeRuntimeChunkChar
94
+ // ? `./runtime-${entrypoint.name}`
95
+ // : `./runtime~${entrypoint.name}`
96
+ // },
93
97
  concatenateModules: true,
94
98
  minimize: true,
95
99
  // by default if minimize: true in webpack minimize then webpack automaticaly add TerserPlugin,
package/lib/jest/run.js CHANGED
@@ -30,6 +30,8 @@ let argv = process.argv.slice(2);
30
30
 
31
31
  let config = require('../configs/jest.config');
32
32
 
33
+ console.log(JSON.stringify(config(null, true)), 'hello');
34
+
33
35
  if (isCommitCoverage) {
34
36
  (0, _coverageCollector.default)(srcBranch, targetBranch, serviceName, impactServerDomain).then((res = {}) => {
35
37
  if (res.STATUS) {
@@ -340,7 +340,7 @@ var _default = {
340
340
  },
341
341
  sourcemap: {
342
342
  cli: 'source_map',
343
- value: 'cheap-eval-source-map'
343
+ value: 'source-map'
344
344
  },
345
345
  externals: null
346
346
  },