@abcnews/aunty 13.2.0 → 13.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abcnews/aunty",
3
- "version": "13.2.0",
3
+ "version": "13.2.2",
4
4
  "description": "A toolkit for working with ABC News projects",
5
5
  "repository": "abcnews/aunty",
6
6
  "license": "MIT",
@@ -147,6 +147,8 @@ function createWebpackConfig({ isModernJS } = {}) {
147
147
  const { pkg, root, hasTS, type, webpack: projectWebpackConfig } = getProjectConfig();
148
148
  const { entry, extractCSS, from, includedDependencies, staticDir, to, useCSSModules } = getBuildConfig();
149
149
  const isProd = process.env.NODE_ENV === 'production';
150
+ const hasEnvFile = existsSync(join(root, '.env'));
151
+ const hasEnvExampleFile = existsSync(join(root, '.env.example'));
150
152
 
151
153
  const config = merge(
152
154
  {
@@ -232,7 +234,11 @@ function createWebpackConfig({ isModernJS } = {}) {
232
234
  },
233
235
  plugins: [
234
236
  new EnvironmentPlugin(Object.keys(process.env)),
235
- new Dotenv(),
237
+ hasEnvFile || hasEnvExampleFile
238
+ ? new Dotenv({
239
+ safe: hasEnvExampleFile
240
+ })
241
+ : null,
236
242
  hasTS
237
243
  ? new ForkTsCheckerWebpackPlugin({
238
244
  logger: { infrastructure: 'silent', issues: 'silent' },