gdu 4.0.2 → 4.0.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # gdu
2
2
 
3
+ ## 4.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - GDU: sets octopus var for prod public path
8
+
9
+ ## 4.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - GDU: Sets public asset paths
14
+
15
+ ## 4.0.4
16
+
17
+ ### Patch Changes
18
+
19
+ - GDU: Passes on app and node envs to build command
20
+
21
+ ## 4.0.3
22
+
23
+ ### Patch Changes
24
+
25
+ - SSR apps: Get changes to their nextjs config defaults
26
+
3
27
  ## 4.0.2
4
28
 
5
29
  ### Patch Changes
@@ -17,6 +17,11 @@ const buildSSR = async (guruConfig) => {
17
17
  stdio: 'inherit',
18
18
  cwd: roots_1.PROJECT_ROOT,
19
19
  localDir: roots_1.GDU_ROOT,
20
+ extendEnv: true,
21
+ env: {
22
+ NODE_ENV: process.env.NODE_ENV || 'production',
23
+ APP_ENV: process.env.APP_ENV || 'prod',
24
+ },
20
25
  })
21
26
  .then((result) => {
22
27
  console.log(`${kleur_1.dim('SUCCESS!')}`, `${kleur_1.dim('Listening')}: ${kleur_1.blue(result === null || result === void 0 ? void 0 : result.all)}`);
@@ -3,8 +3,19 @@ export declare const createNextJSConfig: (buildEnv: any) => {
3
3
  distDir: string;
4
4
  reactStrictMode: boolean;
5
5
  swcMinify: boolean;
6
+ assetPrefix: string;
6
7
  experimental: {
7
8
  concurrentFeatures: boolean;
9
+ serverComponents: boolean;
10
+ };
11
+ i18n: {
12
+ locales: string[];
13
+ defaultLocale: string;
14
+ };
15
+ typescript: {
16
+ transpileOnly: boolean;
17
+ ignoreDevErrors: boolean;
18
+ ignoreBuildErrors: boolean;
8
19
  };
9
20
  images: {
10
21
  domains: string[];
@@ -31,6 +31,7 @@ const webpack_1 = require("webpack");
31
31
  const misc_1 = require("../lib/misc");
32
32
  const roots_1 = require("../lib/roots");
33
33
  const configs_1 = require("../utils/configs");
34
+ const config_1 = require("../lib/config");
34
35
  const withVanillaExtract = next_plugin_1.createVanillaExtractPlugin();
35
36
  exports.withTM = next_transpile_modules_1.default([
36
37
  '@autoguru/themes',
@@ -45,14 +46,26 @@ exports.withTM = next_transpile_modules_1.default([
45
46
  '@popperjs/core',
46
47
  ]);
47
48
  const createNextJSConfig = (buildEnv) => {
49
+ var _a;
48
50
  const isDev = !misc_1.isEnvProduction();
49
51
  const env = process.env.APP_ENV || (isDev ? 'dev' : buildEnv);
50
52
  return {
51
53
  distDir: `dist/${env}`,
52
54
  reactStrictMode: true,
53
55
  swcMinify: true,
56
+ assetPrefix: isDev ? null : (_a = config_1.getGuruConfig()) === null || _a === void 0 ? void 0 : _a.publicPath,
54
57
  experimental: {
55
58
  concurrentFeatures: false,
59
+ serverComponents: false,
60
+ },
61
+ i18n: {
62
+ locales: ['en'],
63
+ defaultLocale: 'en',
64
+ },
65
+ typescript: {
66
+ transpileOnly: true,
67
+ ignoreDevErrors: true,
68
+ ignoreBuildErrors: true,
56
69
  },
57
70
  images: {
58
71
  domains: [
@@ -88,5 +101,5 @@ const createNextJSConfig = (buildEnv) => {
88
101
  };
89
102
  };
90
103
  exports.createNextJSConfig = createNextJSConfig;
91
- const createNextJSTranspiledConfig = () => withVanillaExtract(exports.withTM(exports.createNextJSConfig('uat')));
104
+ const createNextJSTranspiledConfig = () => withVanillaExtract(exports.withTM(exports.createNextJSConfig('prod')));
92
105
  exports.createNextJSTranspiledConfig = createNextJSTranspiledConfig;
@@ -298,22 +298,21 @@ const baseOptions = (buildEnv, isMultiEnv) => ({
298
298
  ].filter(Boolean),
299
299
  });
300
300
  const { outputPath } = config_1.getGuruConfig();
301
- const makeWebpackConfig = (buildEnv, isMultiEnv) => {
302
- var _a, _b;
303
- return ({
304
- name: buildEnv,
305
- output: {
306
- path: `${outputPath}/${!isMultiEnv && buildEnv === 'prod' ? '' : buildEnv}`,
307
- publicPath: isDev ? '/' : (_b = (_a = config_1.getGuruConfig()) === null || _a === void 0 ? void 0 : _a.publicPath) !== null && _b !== void 0 ? _b : '/',
308
- filename: `${fileMask}.js`,
309
- chunkFilename: `chunks/${fileMask}.js`,
310
- hashFunction: 'sha256',
311
- crossOriginLoading: 'anonymous',
312
- sourceMapFilename: 'sourceMaps/[file].map',
313
- pathinfo: false,
314
- },
315
- });
316
- };
301
+ const makeWebpackConfig = (buildEnv, isMultiEnv) => ({
302
+ name: buildEnv,
303
+ output: {
304
+ path: `${outputPath}/${!isMultiEnv && buildEnv === 'prod' ? '' : buildEnv}`,
305
+ publicPath: isDev
306
+ ? '/'
307
+ : (buildEnv === 'prod' ? '#{PUBLIC_PATH_BASE}' : `https://static-mfe-${buildEnv}.autoguru.io`),
308
+ filename: `${fileMask}.js`,
309
+ chunkFilename: `chunks/${fileMask}.js`,
310
+ hashFunction: 'sha256',
311
+ crossOriginLoading: 'anonymous',
312
+ sourceMapFilename: 'sourceMaps/[file].map',
313
+ pathinfo: false,
314
+ },
315
+ });
317
316
  const buildConfigs = () => {
318
317
  const buildEnvs = configs_1.getBuildEnvs();
319
318
  return buildEnvs.map((buildEnv) => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdu",
3
- "version": "4.0.2",
3
+ "version": "4.0.6",
4
4
  "private": false,
5
5
  "description": "AutoGuru's development toolkit",
6
6
  "homepage": "https://github.com/autoguru-au/octane/tree/master/packages/gdu#readme",