@rnw-community/nestjs-webpack-swc 0.28.0 → 0.31.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.
- package/dist/config/get-nestjs-webpack-dev.config.js +13 -32
- package/dist/config/get-nestjs-webpack-dev.config.js.map +1 -1
- package/dist/config/get-nestjs-webpack-generic.config.d.ts +2 -1
- package/dist/config/get-nestjs-webpack-generic.config.d.ts.map +1 -1
- package/dist/config/get-nestjs-webpack-generic.config.js +28 -30
- package/dist/config/get-nestjs-webpack-generic.config.js.map +1 -1
- package/dist/config/get-nestjs-webpack-prod.config.d.ts.map +1 -1
- package/dist/config/get-nestjs-webpack-prod.config.js +19 -12
- package/dist/config/get-nestjs-webpack-prod.config.js.map +1 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/typeorm/import-typeorm-webpack-migrations.util.js +7 -26
- package/dist/typeorm/import-typeorm-webpack-migrations.util.js.map +1 -1
- package/package.json +4 -2
- package/readme.md +4 -2
|
@@ -1,37 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
14
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
15
|
-
if (ar || !(i in from)) {
|
|
16
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
17
|
-
ar[i] = from[i];
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
21
|
-
};
|
|
22
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
3
|
exports.getNestJSWebpackDevConfig = void 0;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
4
|
+
const run_script_webpack_plugin_1 = require("run-script-webpack-plugin");
|
|
5
|
+
const get_nestjs_webpack_generic_config_1 = require("./get-nestjs-webpack-generic.config");
|
|
6
|
+
const getNestJSWebpackDevConfig = (options, webpack) => ({
|
|
7
|
+
...(0, get_nestjs_webpack_generic_config_1.getNestJSWebpackGenericConfig)(options),
|
|
8
|
+
// @ts-expect-error Improve this extending
|
|
9
|
+
entry: ['webpack/hot/poll?100', options.entry],
|
|
10
|
+
plugins: [
|
|
11
|
+
...options.plugins,
|
|
12
|
+
new webpack.HotModuleReplacementPlugin(),
|
|
13
|
+
new webpack.WatchIgnorePlugin({ paths: [/\.js$/u, /\.d\.ts$/u] }),
|
|
14
|
+
new run_script_webpack_plugin_1.RunScriptWebpackPlugin({ name: options.output?.filename, autoRestart: false }),
|
|
15
|
+
],
|
|
16
|
+
});
|
|
36
17
|
exports.getNestJSWebpackDevConfig = getNestJSWebpackDevConfig;
|
|
37
18
|
//# sourceMappingURL=get-nestjs-webpack-dev.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-nestjs-webpack-dev.config.js","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-dev.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-nestjs-webpack-dev.config.js","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-dev.config.ts"],"names":[],"mappings":";;;AAAA,yEAAmE;AAEnE,2FAAoF;AAK7E,MAAM,yBAAyB,GAAG,CAAC,OAAsB,EAAE,OAAuB,EAAiB,EAAE,CAAC,CAAC;IAC1G,GAAG,IAAA,iEAA6B,EAAC,OAAO,CAAC;IACzC,0CAA0C;IAC1C,KAAK,EAAE,CAAC,sBAAsB,EAAE,OAAO,CAAC,KAAK,CAAC;IAC9C,OAAO,EAAE;QACL,GAAI,OAAO,CAAC,OAAmC;QAC/C,IAAI,OAAO,CAAC,0BAA0B,EAAE;QACxC,IAAI,OAAO,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC,EAAE,CAAC;QACjE,IAAI,kDAAsB,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,QAAkB,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;KAC/F;CACJ,CAAC,CAAC;AAVU,QAAA,yBAAyB,6BAUnC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import type { Configuration } from 'webpack';
|
|
2
|
-
|
|
2
|
+
import type webpackNodeExternals from 'webpack-node-externals';
|
|
3
|
+
export declare const getNestJSWebpackGenericConfig: (options: Configuration, swcOptions?: Record<string, unknown>, allowList?: webpackNodeExternals.Options['allowlist']) => Configuration;
|
|
3
4
|
//# sourceMappingURL=get-nestjs-webpack-generic.config.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-nestjs-webpack-generic.config.d.ts","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-generic.config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"get-nestjs-webpack-generic.config.d.ts","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-generic.config.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,oBAAoB,MAAM,wBAAwB,CAAC;AAE/D,eAAO,MAAM,6BAA6B,YAC7B,aAAa,eACV,OAAO,MAAM,EAAE,OAAO,CAAC,cACxB,qBAAqB,OAAO,CAAC,WAAW,CAAC,KACrD,aAwBD,CAAC"}
|
|
@@ -1,38 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
4
|
};
|
|
16
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
6
|
exports.getNestJSWebpackGenericConfig = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const webpack_node_externals_1 = __importDefault(require("webpack-node-externals"));
|
|
9
|
+
const swc_config_1 = require("./swc.config");
|
|
10
|
+
const getNestJSWebpackGenericConfig = (options, swcOptions = {}, allowList = []) => ({
|
|
11
|
+
...options,
|
|
12
|
+
externals: [
|
|
13
|
+
// HINT: We need to include this package inside the build to handle missing dependencies errors, and tree-shake it
|
|
14
|
+
(0, webpack_node_externals_1.default)({
|
|
15
|
+
modulesFromFile: true,
|
|
16
|
+
allowlist: ['webpack/hot/poll?100', ...(Array.isArray(allowList) ? allowList : [allowList])],
|
|
17
|
+
}),
|
|
18
|
+
],
|
|
19
|
+
externalsPresets: { node: true },
|
|
20
|
+
cache: {
|
|
21
|
+
type: 'filesystem',
|
|
22
|
+
cacheDirectory: path_1.default.resolve(process.cwd(), '.build_cache'),
|
|
23
|
+
allowCollectingMemory: true,
|
|
24
|
+
},
|
|
25
|
+
module: {
|
|
26
|
+
rules: [
|
|
27
|
+
{
|
|
28
|
+
test: /\.tsx?$/u,
|
|
29
|
+
use: { loader: 'swc-loader', options: { ...swc_config_1.swcConfig, ...swcOptions } },
|
|
30
|
+
exclude: /(node_modules)/u,
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
});
|
|
37
35
|
exports.getNestJSWebpackGenericConfig = getNestJSWebpackGenericConfig;
|
|
38
36
|
//# sourceMappingURL=get-nestjs-webpack-generic.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-nestjs-webpack-generic.config.js","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-generic.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-nestjs-webpack-generic.config.js","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-generic.config.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,oFAAmD;AAEnD,6CAAyC;AAKlC,MAAM,6BAA6B,GAAG,CACzC,OAAsB,EACtB,aAAsC,EAAE,EACxC,YAAuD,EAAE,EAC5C,EAAE,CAAC,CAAC;IACjB,GAAG,OAAO;IACV,SAAS,EAAE;QACP,kHAAkH;QAClH,IAAA,gCAAa,EAAC;YACV,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,CAAC,sBAAsB,EAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;SAC/F,CAAC;KACL;IACD,gBAAgB,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IAChC,KAAK,EAAE;QACH,IAAI,EAAE,YAAY;QAClB,cAAc,EAAE,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,CAAC;QAC3D,qBAAqB,EAAE,IAAI;KAC9B;IACD,MAAM,EAAE;QACJ,KAAK,EAAE;YACH;gBACI,IAAI,EAAE,UAAU;gBAChB,GAAG,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE,EAAE,GAAG,sBAAS,EAAE,GAAG,UAAU,EAAE,EAAE;gBACvE,OAAO,EAAE,iBAAiB;aAC7B;SACJ;KACJ;CACJ,CAAC,CAAC;AA5BU,QAAA,6BAA6B,iCA4BvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-nestjs-webpack-prod.config.d.ts","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-prod.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-nestjs-webpack-prod.config.d.ts","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-prod.config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AAEnC,eAAO,MAAM,0BAA0B,YAAa,aAAa,YAAY,cAAc,KAAG,aAc5F,CAAC"}
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
12
4
|
};
|
|
13
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
6
|
exports.getNestJSWebpackProdConfig = void 0;
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
const terser_webpack_plugin_1 = __importDefault(require("terser-webpack-plugin"));
|
|
8
|
+
const get_nestjs_webpack_generic_config_1 = require("./get-nestjs-webpack-generic.config");
|
|
9
|
+
const getNestJSWebpackProdConfig = (options, _webpack) => ({
|
|
10
|
+
...(0, get_nestjs_webpack_generic_config_1.getNestJSWebpackGenericConfig)(options, { minify: true }, '@rnw-community/nestjs-webpack-swc'),
|
|
11
|
+
mode: 'production',
|
|
12
|
+
optimization: {
|
|
13
|
+
minimize: true,
|
|
14
|
+
minimizer: [
|
|
15
|
+
new terser_webpack_plugin_1.default({
|
|
16
|
+
parallel: true,
|
|
17
|
+
terserOptions: {
|
|
18
|
+
keep_classnames: true,
|
|
19
|
+
},
|
|
20
|
+
}),
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
});
|
|
17
24
|
exports.getNestJSWebpackProdConfig = getNestJSWebpackProdConfig;
|
|
18
25
|
//# sourceMappingURL=get-nestjs-webpack-prod.config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-nestjs-webpack-prod.config.js","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-prod.config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-nestjs-webpack-prod.config.js","sourceRoot":"","sources":["../../src/config/get-nestjs-webpack-prod.config.ts"],"names":[],"mappings":";;;;;;AAAA,kFAAiD;AAEjD,2FAAoF;AAK7E,MAAM,0BAA0B,GAAG,CAAC,OAAsB,EAAE,QAAwB,EAAiB,EAAE,CAAC,CAAC;IAC5G,GAAG,IAAA,iEAA6B,EAAC,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,mCAAmC,CAAC;IAChG,IAAI,EAAE,YAAY;IAClB,YAAY,EAAE;QACV,QAAQ,EAAE,IAAI;QACd,SAAS,EAAE;YACP,IAAI,+BAAY,CAAC;gBACb,QAAQ,EAAE,IAAI;gBACd,aAAa,EAAE;oBACX,eAAe,EAAE,IAAI;iBACxB;aACJ,CAAC;SACL;KACJ;CACJ,CAAC,CAAC;AAdU,QAAA,0BAA0B,8BAcpC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
export * from './config/get-nestjs-webpack-generic.config';
|
|
2
|
-
export * from './config/get-nestjs-webpack-dev.config';
|
|
3
|
-
export * from './config/get-nestjs-webpack-prod.config';
|
|
4
|
-
export * from './config/swc.config';
|
|
5
1
|
export * from './typeorm/import-typeorm-webpack-migrations.util';
|
|
6
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kDAAkD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,9 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./config/get-nestjs-webpack-generic.config"), exports);
|
|
18
|
-
__exportStar(require("./config/get-nestjs-webpack-dev.config"), exports);
|
|
19
|
-
__exportStar(require("./config/get-nestjs-webpack-prod.config"), exports);
|
|
20
|
-
__exportStar(require("./config/swc.config"), exports);
|
|
21
17
|
__exportStar(require("./typeorm/import-typeorm-webpack-migrations.util"), exports);
|
|
22
18
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mFAAiE"}
|
|
@@ -1,32 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
-
if (ar || !(i in from)) {
|
|
5
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
-
ar[i] = from[i];
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
exports.importTypeormWebpackMigrations = void 0;
|
|
13
4
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var exported = _a[1];
|
|
22
|
-
return typeof exported === 'function';
|
|
23
|
-
})
|
|
24
|
-
.reduce(function (result, _a) {
|
|
25
|
-
var exported = _a[1];
|
|
26
|
-
return __spreadArray(__spreadArray([], result, true), [exported], false);
|
|
27
|
-
}, []);
|
|
28
|
-
})
|
|
29
|
-
.flat();
|
|
30
|
-
};
|
|
5
|
+
const importTypeormWebpackMigrations = (requireContext) => requireContext
|
|
6
|
+
.keys()
|
|
7
|
+
.sort()
|
|
8
|
+
.map(filename => Object.entries(requireContext(filename))
|
|
9
|
+
.filter(([, exported]) => typeof exported === 'function')
|
|
10
|
+
.reduce((result, [, exported]) => [...result, exported], []))
|
|
11
|
+
.flat();
|
|
31
12
|
exports.importTypeormWebpackMigrations = importTypeormWebpackMigrations;
|
|
32
13
|
//# sourceMappingURL=import-typeorm-webpack-migrations.util.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"import-typeorm-webpack-migrations.util.js","sourceRoot":"","sources":["../../src/typeorm/import-typeorm-webpack-migrations.util.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"import-typeorm-webpack-migrations.util.js","sourceRoot":"","sources":["../../src/typeorm/import-typeorm-webpack-migrations.util.ts"],"names":[],"mappings":";;;AAAA,iDAAiD;AAC1C,MAAM,8BAA8B,GAAG,CAAC,cAAiD,EAAc,EAAE,CAC5G,cAAc;KACT,IAAI,EAAE;KACN,IAAI,EAAE;KACN,GAAG,CAAC,QAAQ,CAAC,EAAE,CACZ,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC,QAAQ,CAA6B,CAAC;KAC/D,MAAM,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,QAAQ,KAAK,UAAU,CAAC;KACxD,MAAM,CAAa,CAAC,MAAM,EAAE,CAAC,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,EAAE,CAAC,CAC/E;KACA,IAAI,EAAE,CAAC;AATH,QAAA,8BAA8B,kCAS3B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnw-community/nestjs-webpack-swc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "NestJS typed config",
|
|
6
6
|
"keywords": [
|
|
@@ -35,11 +35,12 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=14.0.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "88ce752b7153d8c0f15584ccd6a6f1b37a58bd0e",
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/webpack-env": "^1.18.0",
|
|
41
41
|
"@types/webpack-node-externals": "^2.5.3",
|
|
42
42
|
"run-script-webpack-plugin": "^0.1.1",
|
|
43
|
+
"terser-webpack-plugin": "^5.3.5",
|
|
43
44
|
"webpack": "^5.74.0",
|
|
44
45
|
"webpack-node-externals": "^3.0.0"
|
|
45
46
|
},
|
|
@@ -49,6 +50,7 @@
|
|
|
49
50
|
"@swc/helpers": "^0.4.7",
|
|
50
51
|
"run-script-webpack-plugin": "^0.1.1",
|
|
51
52
|
"swc-loader": "^0.2.3",
|
|
53
|
+
"terser-webpack-plugin": "^5.3.5",
|
|
52
54
|
"webpack": "^5.74.0",
|
|
53
55
|
"webpack-node-externals": "^3.0.0"
|
|
54
56
|
}
|
package/readme.md
CHANGED
|
@@ -29,7 +29,8 @@ NestJS webpack and SWC configuration helpers, this can speed up your local NestJ
|
|
|
29
29
|
Create `webpack-dev.config.js` in root of the NestJS package:
|
|
30
30
|
|
|
31
31
|
```js
|
|
32
|
-
module.exports =
|
|
32
|
+
module.exports =
|
|
33
|
+
require('@rnw-community/nestjs-webpack-swc/dist/config/get-nestjs-webpack-dev.config').getNestJSWebpackDevConfig;
|
|
33
34
|
```
|
|
34
35
|
|
|
35
36
|
### Production webpack configuration
|
|
@@ -37,7 +38,8 @@ module.exports = require('@rnw-community/nestjs-webpack-swc').getNestJSWebpackDe
|
|
|
37
38
|
Create `webpack-prod.config.js` in root of the NestJS package:
|
|
38
39
|
|
|
39
40
|
```js
|
|
40
|
-
module.exports =
|
|
41
|
+
module.exports =
|
|
42
|
+
require('@rnw-community/nestjs-webpack-swc/dist/config/get-nestjs-webpack-prod.config').getNestJSWebpackProdConfig;
|
|
41
43
|
```
|
|
42
44
|
|
|
43
45
|
### Scripts package.json
|