@sprucelabs/heartwood-view-controllers 121.1.6 → 121.1.7
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,7 @@ import pathUtil from 'path';
|
|
|
12
12
|
import { assertOptions, SchemaError } from '@sprucelabs/schema';
|
|
13
13
|
import { diskUtil } from '@sprucelabs/spruce-skill-utils';
|
|
14
14
|
import TerserPlugin from 'terser-webpack-plugin';
|
|
15
|
-
import { DefinePlugin, webpack } from 'webpack';
|
|
15
|
+
import { DefinePlugin, IgnorePlugin, webpack, } from 'webpack';
|
|
16
16
|
import SpruceError from '../errors/SpruceError.js';
|
|
17
17
|
const graceful = require('graceful-fs');
|
|
18
18
|
graceful.lstat = (path, cb) => {
|
|
@@ -236,6 +236,24 @@ export default class ViewControllerExporter {
|
|
|
236
236
|
},
|
|
237
237
|
plugins: [
|
|
238
238
|
new DefinePlugin(Object.assign({}, defines)),
|
|
239
|
+
new IgnorePlugin({
|
|
240
|
+
checkResource: (resource, context) => {
|
|
241
|
+
const resolved = require.resolve(resource, {
|
|
242
|
+
paths: [context],
|
|
243
|
+
});
|
|
244
|
+
if (resolved.endsWith('.ts') ||
|
|
245
|
+
resolved.endsWith('.js') ||
|
|
246
|
+
resolved.endsWith('.json')) {
|
|
247
|
+
return false;
|
|
248
|
+
}
|
|
249
|
+
// don't ignore if no extension
|
|
250
|
+
if (!pathUtil.extname(resolved)) {
|
|
251
|
+
return false;
|
|
252
|
+
}
|
|
253
|
+
debugger;
|
|
254
|
+
return true;
|
|
255
|
+
},
|
|
256
|
+
}),
|
|
239
257
|
],
|
|
240
258
|
};
|
|
241
259
|
}
|
|
@@ -224,6 +224,24 @@ class ViewControllerExporter {
|
|
|
224
224
|
new webpack_1.DefinePlugin({
|
|
225
225
|
...defines,
|
|
226
226
|
}),
|
|
227
|
+
new webpack_1.IgnorePlugin({
|
|
228
|
+
checkResource: (resource, context) => {
|
|
229
|
+
const resolved = require.resolve(resource, {
|
|
230
|
+
paths: [context],
|
|
231
|
+
});
|
|
232
|
+
if (resolved.endsWith('.ts') ||
|
|
233
|
+
resolved.endsWith('.js') ||
|
|
234
|
+
resolved.endsWith('.json')) {
|
|
235
|
+
return false;
|
|
236
|
+
}
|
|
237
|
+
// don't ignore if no extension
|
|
238
|
+
if (!path_1.default.extname(resolved)) {
|
|
239
|
+
return false;
|
|
240
|
+
}
|
|
241
|
+
debugger;
|
|
242
|
+
return true;
|
|
243
|
+
},
|
|
244
|
+
}),
|
|
227
245
|
],
|
|
228
246
|
};
|
|
229
247
|
}
|
package/package.json
CHANGED