@gravity-ui/app-builder 0.9.3 → 0.9.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.
@@ -12,7 +12,15 @@ function buildServer(config) {
12
12
  (0, utils_1.createRunFolder)();
13
13
  return new Promise((resolve, reject) => {
14
14
  const build = new controllable_script_1.ControllableScript(`
15
- const ts = require('typescript');
15
+ let ts;
16
+ try {
17
+ ts = require('typescript');
18
+ } catch (e) {
19
+ if (e.code !== 'MODULE_NOT_FOUND') {
20
+ throw e;
21
+ }
22
+ ts = require(${JSON.stringify(require.resolve('typescript'))});
23
+ }
16
24
  const {Logger} = require(${JSON.stringify(require.resolve('../../../common/logger'))});
17
25
  const {compile} = require(${JSON.stringify(require.resolve('../../../common/typescript/compile'))});
18
26
 
@@ -37,7 +37,15 @@ function watchServerCompilation(config) {
37
37
  rimraf_1.rimraf.sync(serverPath);
38
38
  (0, utils_1.createRunFolder)();
39
39
  const build = new controllable_script_1.ControllableScript(`
40
- const ts = require('typescript');
40
+ let ts;
41
+ try {
42
+ ts = require('typescript');
43
+ } catch (e) {
44
+ if (e.code !== 'MODULE_NOT_FOUND') {
45
+ throw e;
46
+ }
47
+ ts = require(${JSON.stringify(require.resolve('typescript'))});
48
+ }
41
49
  const {Logger} = require(${JSON.stringify(require.resolve('../../common/logger'))});
42
50
  const {watch} = require(${JSON.stringify(require.resolve('../../common/typescript/watch'))});
43
51
 
@@ -50,7 +58,7 @@ function watchServerCompilation(config) {
50
58
  onAfterFilesEmitted: () => {
51
59
  process.send({type: 'Emitted'});
52
60
  },
53
- enableSourceMap: ${config.server.inspect || config.server.inspectBrk ? 'true' : 'false'}
61
+ enableSourceMap: true
54
62
  }
55
63
  );
56
64
  `, null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/app-builder",
3
- "version": "0.9.3",
3
+ "version": "0.9.4",
4
4
  "description": "Develop and build your React client-server projects, powered by typescript and webpack",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",