gdu 4.0.5 → 4.0.9
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.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- GDU: Fixes spa public path for prod env
|
|
8
|
+
|
|
9
|
+
## 4.0.8
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- GDU: Fixes public path for prod builds
|
|
14
|
+
|
|
15
|
+
## 4.0.7
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- GDU: sets unique ourput dirs
|
|
20
|
+
|
|
21
|
+
## 4.0.6
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- GDU: sets octopus var for prod public path
|
|
26
|
+
|
|
3
27
|
## 4.0.5
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -18,7 +18,10 @@ const buildSSR = async (guruConfig) => {
|
|
|
18
18
|
cwd: roots_1.PROJECT_ROOT,
|
|
19
19
|
localDir: roots_1.GDU_ROOT,
|
|
20
20
|
extendEnv: true,
|
|
21
|
-
env: {
|
|
21
|
+
env: {
|
|
22
|
+
NODE_ENV: 'production',
|
|
23
|
+
APP_ENV: process.env.APP_ENV || 'prod',
|
|
24
|
+
},
|
|
22
25
|
})
|
|
23
26
|
.then((result) => {
|
|
24
27
|
console.log(`${kleur_1.dim('SUCCESS!')}`, `${kleur_1.dim('Listening')}: ${kleur_1.blue(result === null || result === void 0 ? void 0 : result.all)}`);
|
|
@@ -49,11 +49,12 @@ const createNextJSConfig = (buildEnv) => {
|
|
|
49
49
|
var _a;
|
|
50
50
|
const isDev = !misc_1.isEnvProduction();
|
|
51
51
|
const env = process.env.APP_ENV || (isDev ? 'dev' : buildEnv);
|
|
52
|
+
const assetPrefix = isDev ? '' : (_a = config_1.getGuruConfig()) === null || _a === void 0 ? void 0 : _a.publicPath;
|
|
52
53
|
return {
|
|
53
|
-
distDir: `dist/${env}`,
|
|
54
|
+
distDir: `dist/${env}/${assetPrefix}`,
|
|
54
55
|
reactStrictMode: true,
|
|
55
56
|
swcMinify: true,
|
|
56
|
-
assetPrefix
|
|
57
|
+
assetPrefix,
|
|
57
58
|
experimental: {
|
|
58
59
|
concurrentFeatures: false,
|
|
59
60
|
serverComponents: false,
|
|
@@ -76,7 +76,6 @@ const baseOptions = (buildEnv, isMultiEnv) => ({
|
|
|
76
76
|
mode: isDev ? 'development' : 'production',
|
|
77
77
|
entry: {
|
|
78
78
|
main: [
|
|
79
|
-
!isDev && path_1.join(gduEntryPath, '/spa/set-public-path.js'),
|
|
80
79
|
path_1.join(gduEntryPath, '/polyfill.js'),
|
|
81
80
|
path_1.join(gduEntryPath, '/spa/client.js'),
|
|
82
81
|
].filter(Boolean),
|
|
@@ -298,22 +297,21 @@ const baseOptions = (buildEnv, isMultiEnv) => ({
|
|
|
298
297
|
].filter(Boolean),
|
|
299
298
|
});
|
|
300
299
|
const { outputPath } = config_1.getGuruConfig();
|
|
301
|
-
const makeWebpackConfig = (buildEnv, isMultiEnv) => {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
};
|
|
300
|
+
const makeWebpackConfig = (buildEnv, isMultiEnv) => ({
|
|
301
|
+
name: buildEnv,
|
|
302
|
+
output: {
|
|
303
|
+
path: `${outputPath}/${!isMultiEnv && buildEnv === 'prod' ? '' : buildEnv}`,
|
|
304
|
+
publicPath: isDev
|
|
305
|
+
? '/'
|
|
306
|
+
: (buildEnv === 'prod' ? `#{PUBLIC_PATH_BASE}${config_1.getProjectName()}` : `https://static-mfe-${buildEnv}.autoguru.io/${config_1.getProjectName()}`),
|
|
307
|
+
filename: `${fileMask}.js`,
|
|
308
|
+
chunkFilename: `chunks/${fileMask}.js`,
|
|
309
|
+
hashFunction: 'sha256',
|
|
310
|
+
crossOriginLoading: 'anonymous',
|
|
311
|
+
sourceMapFilename: 'sourceMaps/[file].map',
|
|
312
|
+
pathinfo: false,
|
|
313
|
+
},
|
|
314
|
+
});
|
|
317
315
|
const buildConfigs = () => {
|
|
318
316
|
const buildEnvs = configs_1.getBuildEnvs();
|
|
319
317
|
return buildEnvs.map((buildEnv) => ({
|