@gravity-ui/app-builder 0.11.2 → 0.11.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.
@@ -73,13 +73,15 @@ const pitch = function (request) {
73
73
  configureSourceMap(workerCompiler);
74
74
  const cb = this.async();
75
75
  workerCompiler.compile((err, compilation) => {
76
- if (!compilation) {
77
- return undefined;
76
+ if (compilation) {
77
+ workerCompiler.parentCompilation?.children.push(compilation);
78
78
  }
79
- workerCompiler.parentCompilation?.children.push(compilation);
80
79
  if (err) {
81
80
  return cb(err);
82
81
  }
82
+ if (!compilation) {
83
+ return cb(new Error('Child compilation failed'));
84
+ }
83
85
  if (compilation.errors && compilation.errors.length) {
84
86
  const errorDetails = compilation.errors
85
87
  .map((error) => {
@@ -95,7 +97,7 @@ const pitch = function (request) {
95
97
  const cacheIdent = request;
96
98
  const objectToHash = compilation.assets[filename];
97
99
  if (!objectToHash) {
98
- throw new Error(`Asset ${filename} not found in compilation`);
100
+ return cb(new Error(`Asset ${filename} not found in compilation`));
99
101
  }
100
102
  const cacheETag = cache.getLazyHashedEtag(objectToHash);
101
103
  return cache.get(cacheIdent, cacheETag, (getCacheError, cacheContent) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/app-builder",
3
- "version": "0.11.2",
3
+ "version": "0.11.3",
4
4
  "description": "Develop and build your React client-server projects, powered by typescript and webpack",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",