@shuvi/service 2.0.0-dev.13 → 2.0.0-dev.15

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.
@@ -138,7 +138,7 @@ class RspackBundler {
138
138
  // );
139
139
  const rspackWatching = this._compiler.watch(this._compiler.compilers[0].options.watchOptions || {}, (error, multiStats) => {
140
140
  if (error) {
141
- throw error;
141
+ console.error('error', error);
142
142
  }
143
143
  });
144
144
  this._watching.set(rspackWatching);
@@ -204,11 +204,19 @@ class RspackBundler {
204
204
  errors.push(...(statsData.errors || []));
205
205
  });
206
206
  if (warnings.length > 0) {
207
- console.warn('warnings', warnings);
207
+ warnings.forEach(warning => {
208
+ console.warn('warning message', warning.message);
209
+ console.warn('warning file', warning.file);
210
+ });
208
211
  }
209
212
  if (errors.length > 0) {
210
- console.log('errors', errors);
211
- process.exit(1);
213
+ errors.forEach(error => {
214
+ console.error('error message', error.message);
215
+ console.error('error file', error.file);
216
+ });
217
+ if (process.env.NODE_ENV === 'production') {
218
+ process.exit(1);
219
+ }
212
220
  }
213
221
  const isSuccessful = !warnings.length && !errors.length;
214
222
  if (isSuccessful) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shuvi/service",
3
- "version": "2.0.0-dev.13",
3
+ "version": "2.0.0-dev.15",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/shuvijs/shuvi.git",
@@ -29,14 +29,14 @@
29
29
  "@babel/generator": "7.14.5",
30
30
  "@babel/parser": "7.14.7",
31
31
  "@babel/traverse": "7.14.7",
32
- "@shuvi/hook": "2.0.0-dev.13",
33
- "@shuvi/router": "2.0.0-dev.13",
34
- "@shuvi/runtime": "2.0.0-dev.13",
35
- "@shuvi/shared": "2.0.0-dev.13",
36
- "@shuvi/toolpack": "2.0.0-dev.13",
37
- "@shuvi/utils": "2.0.0-dev.13",
38
- "@shuvi/error-overlay": "2.0.0-dev.13",
39
- "@shuvi/reporters": "2.0.0-dev.13",
32
+ "@shuvi/hook": "2.0.0-dev.15",
33
+ "@shuvi/router": "2.0.0-dev.15",
34
+ "@shuvi/runtime": "2.0.0-dev.15",
35
+ "@shuvi/shared": "2.0.0-dev.15",
36
+ "@shuvi/toolpack": "2.0.0-dev.15",
37
+ "@shuvi/utils": "2.0.0-dev.15",
38
+ "@shuvi/error-overlay": "2.0.0-dev.15",
39
+ "@shuvi/reporters": "2.0.0-dev.15",
40
40
  "commander": "5.1.0",
41
41
  "comment-json": "4.2.2",
42
42
  "cross-spawn": "7.0.3",