gdu 4.0.1 → 4.0.5
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 +24 -0
- package/dist/commands/build/buildSSR.js +2 -0
- package/dist/config/babel.config.js +1 -1
- package/dist/config/next.config.d.ts +11 -0
- package/dist/config/next.config.js +14 -1
- package/dist/config/webpack/webpack.config.js +2 -2
- package/entry/spa/set-public-path.js +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# gdu
|
|
2
2
|
|
|
3
|
+
## 4.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- GDU: Sets public asset paths
|
|
8
|
+
|
|
9
|
+
## 4.0.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- GDU: Passes on app and node envs to build command
|
|
14
|
+
|
|
15
|
+
## 4.0.3
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- SSR apps: Get changes to their nextjs config defaults
|
|
20
|
+
|
|
21
|
+
## 4.0.2
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- GDU: Fixes spa relay artifact resoluton
|
|
26
|
+
|
|
3
27
|
## 4.0.1
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -17,6 +17,8 @@ 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: { NODE_ENV: process.env.NODE_ENV || 'production', APP_ENV: process.env.APP_ENV || 'prod' },
|
|
20
22
|
})
|
|
21
23
|
.then((result) => {
|
|
22
24
|
console.log(`${kleur_1.dim('SUCCESS!')}`, `${kleur_1.dim('Listening')}: ${kleur_1.blue(result === null || result === void 0 ? void 0 : result.all)}`);
|
|
@@ -41,7 +41,7 @@ module.exports = (guruConfig) => {
|
|
|
41
41
|
haste: false,
|
|
42
42
|
isDevVariable: '__DEV__',
|
|
43
43
|
eagerESModules: true,
|
|
44
|
-
artifactDirectory:
|
|
44
|
+
artifactDirectory: join(PROJECT_ROOT, '../../', 'packages', 'relay', '__generated__'),
|
|
45
45
|
},
|
|
46
46
|
],
|
|
47
47
|
require.resolve('babel-plugin-treat'),
|
|
@@ -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('
|
|
104
|
+
const createNextJSTranspiledConfig = () => withVanillaExtract(exports.withTM(exports.createNextJSConfig('prod')));
|
|
92
105
|
exports.createNextJSTranspiledConfig = createNextJSTranspiledConfig;
|
|
@@ -299,12 +299,12 @@ const baseOptions = (buildEnv, isMultiEnv) => ({
|
|
|
299
299
|
});
|
|
300
300
|
const { outputPath } = config_1.getGuruConfig();
|
|
301
301
|
const makeWebpackConfig = (buildEnv, isMultiEnv) => {
|
|
302
|
-
var _a
|
|
302
|
+
var _a;
|
|
303
303
|
return ({
|
|
304
304
|
name: buildEnv,
|
|
305
305
|
output: {
|
|
306
306
|
path: `${outputPath}/${!isMultiEnv && buildEnv === 'prod' ? '' : buildEnv}`,
|
|
307
|
-
publicPath: isDev ? '/' : (
|
|
307
|
+
publicPath: isDev ? '/' : (_a = `https://static-mfe-${buildEnv}.autoguru.io`) !== null && _a !== void 0 ? _a : '/',
|
|
308
308
|
filename: `${fileMask}.js`,
|
|
309
309
|
chunkFilename: `chunks/${fileMask}.js`,
|
|
310
310
|
hashFunction: 'sha256',
|