@sprucelabs/heartwood-view-controllers 117.0.5 → 117.1.0

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.
@@ -30,5 +30,6 @@ export interface ExportOptions {
30
30
  onDidIncrementallyBuild?: DidIncrementallyBuildHandler;
31
31
  onWillIncrementallyBuild?: DidIncrementallyBuildHandler;
32
32
  shouldWatch?: boolean;
33
+ shouldBuildSourceMaps?: boolean;
33
34
  }
34
35
  export {};
@@ -26,7 +26,7 @@ export default class ViewControllerExporter {
26
26
  export(options) {
27
27
  return __awaiter(this, void 0, void 0, function* () {
28
28
  this.assertValidExportOptions(options);
29
- const { source, destination, profilerStatsDestination, defines, shouldWatch, onDidIncrementallyBuild, onWillIncrementallyBuild, } = options;
29
+ const { source, destination, profilerStatsDestination, defines, shouldWatch, onDidIncrementallyBuild, onWillIncrementallyBuild, shouldBuildSourceMaps, } = options;
30
30
  this.assertValidSource(source);
31
31
  const { filename, dirname } = this.splitToFileAndDir(destination);
32
32
  this.assertValidDestinationFilename(filename);
@@ -35,6 +35,7 @@ export default class ViewControllerExporter {
35
35
  destinationDirname: dirname,
36
36
  destinationFilename: filename,
37
37
  shouldProfile: !!profilerStatsDestination,
38
+ shouldBuildSourceMaps,
38
39
  defines,
39
40
  });
40
41
  this.compiler = this.Compiler();
@@ -130,11 +131,13 @@ export default class ViewControllerExporter {
130
131
  return webpack(this.config);
131
132
  }
132
133
  buildConfiguration(options) {
133
- const { entry, destinationDirname, destinationFilename, shouldProfile, defines, } = options;
134
+ const { entry, destinationDirname, destinationFilename, shouldProfile, defines, shouldBuildSourceMaps, } = options;
134
135
  return {
135
136
  entry,
137
+ mode: shouldBuildSourceMaps ? 'development' : 'production',
136
138
  context: this.cwd,
137
139
  stats: !!shouldProfile,
140
+ devtool: shouldBuildSourceMaps ? 'inline-source-map' : false,
138
141
  resolve: {
139
142
  extensions: ['.ts', '.js'],
140
143
  fallback: {
@@ -184,7 +187,9 @@ export default class ViewControllerExporter {
184
187
  loader: `babel-loader`,
185
188
  options: {
186
189
  configFile: false,
187
- sourceMaps: false,
190
+ sourceMaps: shouldBuildSourceMaps
191
+ ? 'inline'
192
+ : false,
188
193
  presets: [
189
194
  [
190
195
  '@babel/preset-env',
@@ -214,7 +219,7 @@ export default class ViewControllerExporter {
214
219
  ],
215
220
  },
216
221
  optimization: {
217
- minimize: true,
222
+ minimize: !shouldBuildSourceMaps,
218
223
  minimizer: [new TerserPlugin()],
219
224
  },
220
225
  plugins: [
@@ -30,5 +30,6 @@ export interface ExportOptions {
30
30
  onDidIncrementallyBuild?: DidIncrementallyBuildHandler;
31
31
  onWillIncrementallyBuild?: DidIncrementallyBuildHandler;
32
32
  shouldWatch?: boolean;
33
+ shouldBuildSourceMaps?: boolean;
33
34
  }
34
35
  export {};
@@ -21,7 +21,7 @@ class ViewControllerExporter {
21
21
  }
22
22
  async export(options) {
23
23
  this.assertValidExportOptions(options);
24
- const { source, destination, profilerStatsDestination, defines, shouldWatch, onDidIncrementallyBuild, onWillIncrementallyBuild, } = options;
24
+ const { source, destination, profilerStatsDestination, defines, shouldWatch, onDidIncrementallyBuild, onWillIncrementallyBuild, shouldBuildSourceMaps, } = options;
25
25
  this.assertValidSource(source);
26
26
  const { filename, dirname } = this.splitToFileAndDir(destination);
27
27
  this.assertValidDestinationFilename(filename);
@@ -30,6 +30,7 @@ class ViewControllerExporter {
30
30
  destinationDirname: dirname,
31
31
  destinationFilename: filename,
32
32
  shouldProfile: !!profilerStatsDestination,
33
+ shouldBuildSourceMaps,
33
34
  defines,
34
35
  });
35
36
  this.compiler = this.Compiler();
@@ -117,11 +118,13 @@ class ViewControllerExporter {
117
118
  return (0, webpack_1.webpack)(this.config);
118
119
  }
119
120
  buildConfiguration(options) {
120
- const { entry, destinationDirname, destinationFilename, shouldProfile, defines, } = options;
121
+ const { entry, destinationDirname, destinationFilename, shouldProfile, defines, shouldBuildSourceMaps, } = options;
121
122
  return {
122
123
  entry,
124
+ mode: shouldBuildSourceMaps ? 'development' : 'production',
123
125
  context: this.cwd,
124
126
  stats: !!shouldProfile,
127
+ devtool: shouldBuildSourceMaps ? 'inline-source-map' : false,
125
128
  resolve: {
126
129
  extensions: ['.ts', '.js'],
127
130
  fallback: {
@@ -171,7 +174,9 @@ class ViewControllerExporter {
171
174
  loader: `babel-loader`,
172
175
  options: {
173
176
  configFile: false,
174
- sourceMaps: false,
177
+ sourceMaps: shouldBuildSourceMaps
178
+ ? 'inline'
179
+ : false,
175
180
  presets: [
176
181
  [
177
182
  '@babel/preset-env',
@@ -201,7 +206,7 @@ class ViewControllerExporter {
201
206
  ],
202
207
  },
203
208
  optimization: {
204
- minimize: true,
209
+ minimize: !shouldBuildSourceMaps,
205
210
  minimizer: [new terser_webpack_plugin_1.default()],
206
211
  },
207
212
  plugins: [
package/package.json CHANGED
@@ -13,7 +13,7 @@
13
13
  "sideEffects": false,
14
14
  "license": "MIT",
15
15
  "description": "All the power of Heartwood in one, convenient package.",
16
- "version": "117.0.5",
16
+ "version": "117.1.0",
17
17
  "skill": {
18
18
  "namespace": "HeartwoodViewControllers",
19
19
  "commandOverrides": {
@@ -77,10 +77,10 @@
77
77
  "@babel/plugin-transform-runtime": "^7.26.8",
78
78
  "@babel/preset-env": "^7.26.8",
79
79
  "@babel/preset-typescript": "^7.26.0",
80
- "@sprucelabs/calendar-utils": "^42.0.610",
80
+ "@sprucelabs/calendar-utils": "^42.0.611",
81
81
  "@sprucelabs/error": "^6.0.572",
82
82
  "@sprucelabs/globby": "^2.0.501",
83
- "@sprucelabs/mercury-core-events": "^25.1.20",
83
+ "@sprucelabs/mercury-core-events": "^25.1.21",
84
84
  "@sprucelabs/mercury-types": "^47.2.15",
85
85
  "@sprucelabs/schema": "^31.0.32",
86
86
  "@sprucelabs/spruce-core-schemas": "^40.1.620",
@@ -101,8 +101,8 @@
101
101
  "devDependencies": {
102
102
  "@sprucelabs/esm-postbuild": "^6.0.544",
103
103
  "@sprucelabs/jest-json-reporter": "^8.0.573",
104
- "@sprucelabs/mercury-client": "^42.0.712",
105
- "@sprucelabs/mercury-event-emitter": "^42.0.712",
104
+ "@sprucelabs/mercury-client": "^42.0.713",
105
+ "@sprucelabs/mercury-event-emitter": "^42.0.713",
106
106
  "@sprucelabs/resolve-path-aliases": "^2.0.529",
107
107
  "@sprucelabs/semantic-release": "^5.0.2",
108
108
  "@sprucelabs/test": "^9.0.69",