@iamalond/nestjs-i18next 1.3.1 → 1.3.2

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.
@@ -15,7 +15,7 @@ let I18nextJsonLoader = I18nextJsonLoader_1 = class I18nextJsonLoader {
15
15
  this.watchTimeout = null;
16
16
  }
17
17
  onModuleInit() {
18
- if (this.options.loadingOptions.watch) {
18
+ if (this.options.loadingOptions.watch && process.env.NODE_ENV !== 'production') {
19
19
  this.startWatcher();
20
20
  }
21
21
  }
@@ -91,6 +91,12 @@ let I18nextJsonLoader = I18nextJsonLoader_1 = class I18nextJsonLoader {
91
91
  return result;
92
92
  }
93
93
  generateTypes(translations) {
94
+ if (process.env.NODE_ENV === 'production') {
95
+ if (this.options.logging) {
96
+ this.logger.log('Skipping types generation in production environment');
97
+ }
98
+ return;
99
+ }
94
100
  const outputPath = this.options.generatedTypesPath;
95
101
  if (!outputPath)
96
102
  return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iamalond/nestjs-i18next",
3
3
  "description": "🌍 i18next module for NestJS",
4
- "version": "1.3.1",
4
+ "version": "1.3.2",
5
5
  "scripts": {
6
6
  "build": "rimraf -rf dist && tsc -p tsconfig.build.json",
7
7
  "prepublish:npm": "npm run build",