@rnw-community/nestjs-webpack-swc 0.31.1 → 0.33.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.
|
@@ -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;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,
|
|
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,aA4BD,CAAC"}
|
|
@@ -31,6 +31,10 @@ const getNestJSWebpackGenericConfig = (options, swcOptions = {}, allowList = [])
|
|
|
31
31
|
},
|
|
32
32
|
],
|
|
33
33
|
},
|
|
34
|
+
node: {
|
|
35
|
+
__dirname: false,
|
|
36
|
+
__filename: false,
|
|
37
|
+
},
|
|
34
38
|
});
|
|
35
39
|
exports.getNestJSWebpackGenericConfig = getNestJSWebpackGenericConfig;
|
|
36
40
|
//# 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":";;;;;;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;
|
|
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;IACD,IAAI,EAAE;QACF,SAAS,EAAE,KAAK;QAChB,UAAU,EAAE,KAAK;KACpB;CACJ,CAAC,CAAC;AAhCU,QAAA,6BAA6B,iCAgCvC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rnw-community/nestjs-webpack-swc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "NestJS typed config",
|
|
6
6
|
"keywords": [
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=14.0.0"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "9c8bcb3e7bce34d706b20a11bd35e4539fcd009c",
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/webpack-env": "^1.18.0",
|
|
41
41
|
"@types/webpack-node-externals": "^2.5.3",
|
package/readme.md
CHANGED
|
@@ -68,7 +68,7 @@ cases needs separate solutions. Feel free to open an issue.
|
|
|
68
68
|
If your project is using [TypeORM](https://typeorm.io), then you will face problems with running migrations from NestJS app,
|
|
69
69
|
this package provides utility for loading TypeORM migrations within webpack build.
|
|
70
70
|
|
|
71
|
-
1. Install additional
|
|
71
|
+
1. Install additional dev dependencies:
|
|
72
72
|
|
|
73
73
|
- [@types/webpack-env](https://www.npmjs.com/package/@types/webpack-env)
|
|
74
74
|
|
|
@@ -89,6 +89,30 @@ this package provides utility for loading TypeORM migrations within webpack buil
|
|
|
89
89
|
const migrations = importTypeormWebpackMigrations(require.context('./migration/', true, /\.ts$/u));
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
+
#### Typeorm CLI
|
|
93
|
+
|
|
94
|
+
With webpack in place you will not have your migrations transpiled into the dist folder anymore so to use typeorm cli
|
|
95
|
+
you will need additional changes:
|
|
96
|
+
|
|
97
|
+
1. Install additional dev dependencies:
|
|
98
|
+
- [ts-node](https://github.com/TypeStrong/ts-node)
|
|
99
|
+
- [tsconfig-paths](https://github.com/dividab/tsconfig-paths)
|
|
100
|
+
2. Add/change your `package.json` scripts(you should have `tsconfig.build.json` with `module:commonjs`):
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"scripts": {
|
|
105
|
+
"typeorm": "ts-node -P tsconfig.build.json -r tsconfig-paths/register ./node_modules/.bin/typeorm",
|
|
106
|
+
"migrate:create": "yarn typeorm migration:create -d ./data-source.mjs",
|
|
107
|
+
"migrate:down": "yarn typeorm migration:revert -d ./data-source.mjs",
|
|
108
|
+
"migrate:generate": "yarn typeorm migration:generate -d ./data-source.mjs",
|
|
109
|
+
"migrate:up": "yarn typeorm migration:run -d ./data-source.mjs"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
> `-d ./data-source.mjs` is a [TypeORM v3 breaking changes](https://github.com/typeorm/typeorm/blob/master/CHANGELOG.md#breaking-changes-1) you can remove it for v2
|
|
115
|
+
|
|
92
116
|
## SWC possible issues
|
|
93
117
|
|
|
94
118
|
### SWC bindings
|