gdu 4.0.7 → 4.0.11
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.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- GDU: Updates public paths
|
|
8
|
+
|
|
9
|
+
## 4.0.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- GDU: Fixes prod env public path
|
|
14
|
+
|
|
15
|
+
## 4.0.9
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- GDU: Fixes spa public path for prod env
|
|
20
|
+
|
|
21
|
+
## 4.0.8
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- GDU: Fixes public path for prod builds
|
|
26
|
+
|
|
3
27
|
## 4.0.7
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -4,10 +4,6 @@ export declare const createNextJSConfig: (buildEnv: any) => {
|
|
|
4
4
|
reactStrictMode: boolean;
|
|
5
5
|
swcMinify: boolean;
|
|
6
6
|
assetPrefix: string;
|
|
7
|
-
experimental: {
|
|
8
|
-
concurrentFeatures: boolean;
|
|
9
|
-
serverComponents: boolean;
|
|
10
|
-
};
|
|
11
7
|
i18n: {
|
|
12
8
|
locales: string[];
|
|
13
9
|
defaultLocale: string;
|
|
@@ -46,20 +46,15 @@ exports.withTM = next_transpile_modules_1.default([
|
|
|
46
46
|
'@popperjs/core',
|
|
47
47
|
]);
|
|
48
48
|
const createNextJSConfig = (buildEnv) => {
|
|
49
|
-
var _a;
|
|
49
|
+
var _a, _b;
|
|
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;
|
|
53
|
-
console.log({ assetPrefix, isDev });
|
|
52
|
+
const assetPrefix = isDev ? '' : (_b = (_a = config_1.getGuruConfig()) === null || _a === void 0 ? void 0 : _a.publicPath) !== null && _b !== void 0 ? _b : '';
|
|
54
53
|
return {
|
|
55
|
-
distDir: `dist/${env}
|
|
54
|
+
distDir: `dist/${env}`,
|
|
56
55
|
reactStrictMode: true,
|
|
57
56
|
swcMinify: true,
|
|
58
57
|
assetPrefix,
|
|
59
|
-
experimental: {
|
|
60
|
-
concurrentFeatures: false,
|
|
61
|
-
serverComponents: false,
|
|
62
|
-
},
|
|
63
58
|
i18n: {
|
|
64
59
|
locales: ['en'],
|
|
65
60
|
defaultLocale: 'en',
|
|
@@ -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),
|
|
@@ -304,7 +303,9 @@ const makeWebpackConfig = (buildEnv, isMultiEnv) => ({
|
|
|
304
303
|
path: `${outputPath}/${!isMultiEnv && buildEnv === 'prod' ? '' : buildEnv}`,
|
|
305
304
|
publicPath: isDev
|
|
306
305
|
? '/'
|
|
307
|
-
:
|
|
306
|
+
: buildEnv === 'prod'
|
|
307
|
+
? `#{PUBLIC_PATH_BASE}/${config_1.getProjectFolderName()}/`
|
|
308
|
+
: `https://static-mfe-${buildEnv}.autoguru.io/${config_1.getProjectFolderName()}/`,
|
|
308
309
|
filename: `${fileMask}.js`,
|
|
309
310
|
chunkFilename: `chunks/${fileMask}.js`,
|
|
310
311
|
hashFunction: 'sha256',
|
package/dist/lib/config.d.ts
CHANGED
|
@@ -12,3 +12,4 @@ export interface GuruConfig {
|
|
|
12
12
|
export declare const getGuruConfig: (location?: string) => GuruConfig | null;
|
|
13
13
|
export declare const decorateConfig: (guruConfig: Partial<GuruConfig>) => GuruConfig;
|
|
14
14
|
export declare const getProjectName: (location?: string) => any;
|
|
15
|
+
export declare const getProjectFolderName: (location?: string) => string;
|
package/dist/lib/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getProjectName = exports.decorateConfig = exports.getGuruConfig = void 0;
|
|
3
|
+
exports.getProjectFolderName = exports.getProjectName = exports.decorateConfig = exports.getGuruConfig = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const diary_1 = require("diary");
|
|
6
6
|
const resolve_1 = require("./resolve");
|
|
@@ -52,3 +52,5 @@ const decorateConfig = (guruConfig) => {
|
|
|
52
52
|
exports.decorateConfig = decorateConfig;
|
|
53
53
|
const getProjectName = (location = roots_1.PROJECT_ROOT) => require(path_1.join(exports.getGuruConfig(location).__configPath, './package.json')).name;
|
|
54
54
|
exports.getProjectName = getProjectName;
|
|
55
|
+
const getProjectFolderName = (location = roots_1.PROJECT_ROOT) => path_1.basename(path_1.join(exports.getGuruConfig(location).__configPath));
|
|
56
|
+
exports.getProjectFolderName = getProjectFolderName;
|