@commercetools-frontend/mc-scripts 27.12.0 → 27.13.0
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/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +7 -7
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +7 -7
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +7 -7
- package/dist/{build-d10b7b9c.cjs.dev.js → build-57cc074d.cjs.dev.js} +3 -3
- package/dist/{build-88d20516.esm.js → build-5e7d1303.esm.js} +3 -3
- package/dist/{build-5c9807bf.cjs.prod.js → build-7508f568.cjs.prod.js} +3 -3
- package/dist/{build-vite-782c1634.esm.js → build-vite-01e2aaf0.esm.js} +190 -8
- package/dist/{build-vite-0b37a521.cjs.prod.js → build-vite-600ec6bd.cjs.prod.js} +194 -10
- package/dist/{build-vite-dfe4ce01.cjs.dev.js → build-vite-fb6643b3.cjs.dev.js} +194 -10
- package/dist/commercetools-frontend-mc-scripts.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-mc-scripts.esm.js +1 -1
- package/dist/{config-sync-e95f4b01.cjs.prod.js → config-sync-4d2d7d71.cjs.prod.js} +3 -3
- package/dist/{config-sync-8eab0a7a.esm.js → config-sync-593781fd.esm.js} +3 -3
- package/dist/{config-sync-ci-7b9bd247.esm.js → config-sync-ci-1f59bf79.esm.js} +3 -3
- package/dist/{config-sync-ci-93339284.cjs.dev.js → config-sync-ci-7b95c32a.cjs.dev.js} +3 -3
- package/dist/{config-sync-ci-7d64585b.cjs.prod.js → config-sync-ci-f33b765c.cjs.prod.js} +3 -3
- package/dist/{config-sync-a408a6bd.cjs.dev.js → config-sync-f8267173.cjs.dev.js} +3 -3
- package/dist/{config-sync-helpers-1e0d8b73.cjs.dev.js → config-sync-helpers-45798902.cjs.dev.js} +1 -1
- package/dist/{config-sync-helpers-e3387197.esm.js → config-sync-helpers-649b6c87.esm.js} +1 -1
- package/dist/{config-sync-helpers-a24fc76b.cjs.prod.js → config-sync-helpers-ab74b949.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-f0432393.esm.js → create-postcss-config-08564589.esm.js} +1 -1
- package/dist/{create-postcss-config-359a248e.cjs.prod.js → create-postcss-config-2b9affd5.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-4cfdca27.cjs.dev.js → create-postcss-config-5253f51d.cjs.dev.js} +1 -1
- package/dist/{create-webpack-config-for-development-66baf4c7.cjs.prod.js → create-webpack-config-for-development-6e3e2752.cjs.prod.js} +1 -1
- package/dist/{create-webpack-config-for-development-80f64db5.esm.js → create-webpack-config-for-development-83207381.esm.js} +1 -1
- package/dist/{create-webpack-config-for-development-c606ff3e.cjs.dev.js → create-webpack-config-for-development-febf2163.cjs.dev.js} +1 -1
- package/dist/{create-webpack-config-for-production-2c8ea8e1.cjs.dev.js → create-webpack-config-for-production-351be45d.cjs.dev.js} +1 -1
- package/dist/{create-webpack-config-for-production-e268d2a9.cjs.prod.js → create-webpack-config-for-production-35502c64.cjs.prod.js} +1 -1
- package/dist/{create-webpack-config-for-production-5541c8a9.esm.js → create-webpack-config-for-production-d619b595.esm.js} +1 -1
- package/dist/{deployment-previews-set-02d950fa.cjs.prod.js → deployment-previews-set-33a3a023.cjs.prod.js} +2 -2
- package/dist/{deployment-previews-set-0afbb44c.esm.js → deployment-previews-set-697801d9.esm.js} +2 -2
- package/dist/{deployment-previews-set-5cc6cd27.cjs.dev.js → deployment-previews-set-760532e0.cjs.dev.js} +2 -2
- package/dist/{graphql-requests-c8bfe58e.cjs.dev.js → graphql-requests-3cc7deec.cjs.dev.js} +1 -1
- package/dist/{graphql-requests-0f5e76bf.cjs.prod.js → graphql-requests-7ca459c8.cjs.prod.js} +1 -1
- package/dist/{graphql-requests-94a1fb99.esm.js → graphql-requests-e034376f.esm.js} +1 -1
- package/dist/{login-75fe7cb9.cjs.prod.js → login-60fd6d4a.cjs.prod.js} +1 -1
- package/dist/{login-d67e9ddf.esm.js → login-d077a257.esm.js} +1 -1
- package/dist/{login-b51be3e8.cjs.dev.js → login-f32f3623.cjs.dev.js} +1 -1
- package/dist/{package-2ce7d094.cjs.prod.js → package-84973c56.cjs.dev.js} +1 -1
- package/dist/{package-cdfe3e2e.esm.js → package-b717bf0d.esm.js} +1 -1
- package/dist/{package-e604fbd7.cjs.dev.js → package-d1a1140f.cjs.prod.js} +1 -1
- package/dist/{start-bb2cef13.esm.js → start-59484653.esm.js} +3 -3
- package/dist/{start-049ad265.cjs.prod.js → start-9d09aeb0.cjs.prod.js} +3 -3
- package/dist/{start-96ed4013.cjs.dev.js → start-a1034a4d.cjs.dev.js} +3 -3
- package/dist/{start-vite-dd8a1e26.cjs.prod.js → start-vite-69dc28cf.cjs.prod.js} +31 -1
- package/dist/{start-vite-698c9e82.cjs.dev.js → start-vite-a2daee6e.cjs.dev.js} +31 -1
- package/dist/{start-vite-4b0df191.esm.js → start-vite-f0085975.esm.js} +23 -1
- package/package.json +8 -8
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.dev.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.cjs.prod.js +2 -2
- package/postcss/dist/commercetools-frontend-mc-scripts-postcss.esm.js +2 -2
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.dev.js +4 -4
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +4 -4
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +4 -4
|
@@ -10,7 +10,7 @@ var path = require('path');
|
|
|
10
10
|
var commander = require('commander');
|
|
11
11
|
var dotenv = require('dotenv');
|
|
12
12
|
var dotenvExpand = require('dotenv-expand');
|
|
13
|
-
var _package = require('../../dist/package-
|
|
13
|
+
var _package = require('../../dist/package-84973c56.cjs.dev.js');
|
|
14
14
|
var doesFileExist = require('../../dist/does-file-exist-eb86baca.cjs.dev.js');
|
|
15
15
|
require('node:fs');
|
|
16
16
|
|
|
@@ -72,7 +72,7 @@ async function run() {
|
|
|
72
72
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
73
73
|
console.log('');
|
|
74
74
|
}
|
|
75
|
-
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-
|
|
75
|
+
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-a2daee6e.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-a1034a4d.cjs.dev.js'); });
|
|
76
76
|
await startCommand.default();
|
|
77
77
|
});
|
|
78
78
|
|
|
@@ -91,7 +91,7 @@ async function run() {
|
|
|
91
91
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
92
92
|
console.log('');
|
|
93
93
|
}
|
|
94
|
-
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-
|
|
94
|
+
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-fb6643b3.cjs.dev.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-57cc074d.cjs.dev.js'); });
|
|
95
95
|
await buildCommand.default();
|
|
96
96
|
const shouldAlsoCompile = !options.buildOnly;
|
|
97
97
|
if (shouldAlsoCompile) {
|
|
@@ -157,7 +157,7 @@ async function run() {
|
|
|
157
157
|
|
|
158
158
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
159
159
|
process.env.NODE_ENV = 'production';
|
|
160
|
-
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-
|
|
160
|
+
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-f32f3623.cjs.dev.js'); });
|
|
161
161
|
await loginCommand.default(options);
|
|
162
162
|
});
|
|
163
163
|
|
|
@@ -171,7 +171,7 @@ async function run() {
|
|
|
171
171
|
|
|
172
172
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
173
173
|
process.env.NODE_ENV = 'production';
|
|
174
|
-
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-
|
|
174
|
+
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-f8267173.cjs.dev.js'); });
|
|
175
175
|
await configSyncCommand.default(options);
|
|
176
176
|
});
|
|
177
177
|
|
|
@@ -184,7 +184,7 @@ async function run() {
|
|
|
184
184
|
|
|
185
185
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
186
186
|
process.env.NODE_ENV = 'production';
|
|
187
|
-
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-
|
|
187
|
+
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-7b95c32a.cjs.dev.js'); });
|
|
188
188
|
await configSyncCICommand.default(options);
|
|
189
189
|
});
|
|
190
190
|
|
|
@@ -198,7 +198,7 @@ async function run() {
|
|
|
198
198
|
|
|
199
199
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
200
200
|
process.env.NODE_ENV = 'production';
|
|
201
|
-
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-
|
|
201
|
+
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-760532e0.cjs.dev.js'); });
|
|
202
202
|
await deploymentsSetCommand.default(options);
|
|
203
203
|
});
|
|
204
204
|
commander.program.parse();
|
|
@@ -10,7 +10,7 @@ var path = require('path');
|
|
|
10
10
|
var commander = require('commander');
|
|
11
11
|
var dotenv = require('dotenv');
|
|
12
12
|
var dotenvExpand = require('dotenv-expand');
|
|
13
|
-
var _package = require('../../dist/package-
|
|
13
|
+
var _package = require('../../dist/package-d1a1140f.cjs.prod.js');
|
|
14
14
|
var doesFileExist = require('../../dist/does-file-exist-be53305d.cjs.prod.js');
|
|
15
15
|
require('node:fs');
|
|
16
16
|
|
|
@@ -72,7 +72,7 @@ async function run() {
|
|
|
72
72
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
73
73
|
console.log('');
|
|
74
74
|
}
|
|
75
|
-
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-
|
|
75
|
+
const startCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/start-vite-69dc28cf.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/start-9d09aeb0.cjs.prod.js'); });
|
|
76
76
|
await startCommand.default();
|
|
77
77
|
});
|
|
78
78
|
|
|
@@ -91,7 +91,7 @@ async function run() {
|
|
|
91
91
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
92
92
|
console.log('');
|
|
93
93
|
}
|
|
94
|
-
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-
|
|
94
|
+
const buildCommand = shouldUseExperimentalBundler ? await Promise.resolve().then(function () { return require('../../dist/build-vite-600ec6bd.cjs.prod.js'); }) : await Promise.resolve().then(function () { return require('../../dist/build-7508f568.cjs.prod.js'); });
|
|
95
95
|
await buildCommand.default();
|
|
96
96
|
const shouldAlsoCompile = !options.buildOnly;
|
|
97
97
|
if (shouldAlsoCompile) {
|
|
@@ -157,7 +157,7 @@ async function run() {
|
|
|
157
157
|
|
|
158
158
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
159
159
|
process.env.NODE_ENV = 'production';
|
|
160
|
-
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-
|
|
160
|
+
const loginCommand = await Promise.resolve().then(function () { return require('../../dist/login-60fd6d4a.cjs.prod.js'); });
|
|
161
161
|
await loginCommand.default(options);
|
|
162
162
|
});
|
|
163
163
|
|
|
@@ -171,7 +171,7 @@ async function run() {
|
|
|
171
171
|
|
|
172
172
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
173
173
|
process.env.NODE_ENV = 'production';
|
|
174
|
-
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-
|
|
174
|
+
const configSyncCommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-4d2d7d71.cjs.prod.js'); });
|
|
175
175
|
await configSyncCommand.default(options);
|
|
176
176
|
});
|
|
177
177
|
|
|
@@ -184,7 +184,7 @@ async function run() {
|
|
|
184
184
|
|
|
185
185
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
186
186
|
process.env.NODE_ENV = 'production';
|
|
187
|
-
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-
|
|
187
|
+
const configSyncCICommand = await Promise.resolve().then(function () { return require('../../dist/config-sync-ci-f33b765c.cjs.prod.js'); });
|
|
188
188
|
await configSyncCICommand.default(options);
|
|
189
189
|
});
|
|
190
190
|
|
|
@@ -198,7 +198,7 @@ async function run() {
|
|
|
198
198
|
|
|
199
199
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
200
200
|
process.env.NODE_ENV = 'production';
|
|
201
|
-
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-
|
|
201
|
+
const deploymentsSetCommand = await Promise.resolve().then(function () { return require('../../dist/deployment-previews-set-33a3a023.cjs.prod.js'); });
|
|
202
202
|
await deploymentsSetCommand.default(options);
|
|
203
203
|
});
|
|
204
204
|
commander.program.parse();
|
|
@@ -6,7 +6,7 @@ import path from 'path';
|
|
|
6
6
|
import { program } from 'commander';
|
|
7
7
|
import dotenv from 'dotenv';
|
|
8
8
|
import dotenvExpand from 'dotenv-expand';
|
|
9
|
-
import { p as pkgJson } from '../../dist/package-
|
|
9
|
+
import { p as pkgJson } from '../../dist/package-b717bf0d.esm.js';
|
|
10
10
|
import { d as doesFileExist } from '../../dist/does-file-exist-32618334.esm.js';
|
|
11
11
|
import 'node:fs';
|
|
12
12
|
|
|
@@ -40,7 +40,7 @@ async function run() {
|
|
|
40
40
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
41
41
|
console.log('');
|
|
42
42
|
}
|
|
43
|
-
const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-
|
|
43
|
+
const startCommand = shouldUseExperimentalBundler ? await import('../../dist/start-vite-f0085975.esm.js') : await import('../../dist/start-59484653.esm.js');
|
|
44
44
|
await startCommand.default();
|
|
45
45
|
});
|
|
46
46
|
|
|
@@ -59,7 +59,7 @@ async function run() {
|
|
|
59
59
|
console.log('Experimental Vite bundler enabled! 🚀');
|
|
60
60
|
console.log('');
|
|
61
61
|
}
|
|
62
|
-
const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-
|
|
62
|
+
const buildCommand = shouldUseExperimentalBundler ? await import('../../dist/build-vite-01e2aaf0.esm.js') : await import('../../dist/build-5e7d1303.esm.js');
|
|
63
63
|
await buildCommand.default();
|
|
64
64
|
const shouldAlsoCompile = !options.buildOnly;
|
|
65
65
|
if (shouldAlsoCompile) {
|
|
@@ -125,7 +125,7 @@ async function run() {
|
|
|
125
125
|
|
|
126
126
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
127
127
|
process.env.NODE_ENV = 'production';
|
|
128
|
-
const loginCommand = await import('../../dist/login-
|
|
128
|
+
const loginCommand = await import('../../dist/login-d077a257.esm.js');
|
|
129
129
|
await loginCommand.default(options);
|
|
130
130
|
});
|
|
131
131
|
|
|
@@ -139,7 +139,7 @@ async function run() {
|
|
|
139
139
|
|
|
140
140
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
141
141
|
process.env.NODE_ENV = 'production';
|
|
142
|
-
const configSyncCommand = await import('../../dist/config-sync-
|
|
142
|
+
const configSyncCommand = await import('../../dist/config-sync-593781fd.esm.js');
|
|
143
143
|
await configSyncCommand.default(options);
|
|
144
144
|
});
|
|
145
145
|
|
|
@@ -152,7 +152,7 @@ async function run() {
|
|
|
152
152
|
|
|
153
153
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
154
154
|
process.env.NODE_ENV = 'production';
|
|
155
|
-
const configSyncCICommand = await import('../../dist/config-sync-ci-
|
|
155
|
+
const configSyncCICommand = await import('../../dist/config-sync-ci-1f59bf79.esm.js');
|
|
156
156
|
await configSyncCICommand.default(options);
|
|
157
157
|
});
|
|
158
158
|
|
|
@@ -166,7 +166,7 @@ async function run() {
|
|
|
166
166
|
|
|
167
167
|
// Do this as the first thing so that any code reading it knows the right env.
|
|
168
168
|
process.env.NODE_ENV = 'production';
|
|
169
|
-
const deploymentsSetCommand = await import('../../dist/deployment-previews-set-
|
|
169
|
+
const deploymentsSetCommand = await import('../../dist/deployment-previews-set-697801d9.esm.js');
|
|
170
170
|
await deploymentsSetCommand.default(options);
|
|
171
171
|
});
|
|
172
172
|
program.parse();
|
|
@@ -10,7 +10,7 @@ var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
|
|
10
10
|
var printBuildError = require('react-dev-utils/printBuildError');
|
|
11
11
|
var webpack = require('webpack');
|
|
12
12
|
var assets = require('@commercetools-frontend/assets');
|
|
13
|
-
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-
|
|
13
|
+
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-351be45d.cjs.dev.js');
|
|
14
14
|
var paths = require('./paths-b76fc753.cjs.dev.js');
|
|
15
15
|
var doesFileExist = require('./does-file-exist-eb86baca.cjs.dev.js');
|
|
16
16
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -41,9 +41,9 @@ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
|
41
41
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
42
42
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
43
43
|
require('fs');
|
|
44
|
-
require('./create-postcss-config-
|
|
44
|
+
require('./create-postcss-config-5253f51d.cjs.dev.js');
|
|
45
45
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
46
|
-
require('./package-
|
|
46
|
+
require('./package-84973c56.cjs.dev.js');
|
|
47
47
|
require('./optimizations-56be74d6.cjs.dev.js');
|
|
48
48
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
49
49
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
@@ -8,7 +8,7 @@ import formatWebpackMessages from 'react-dev-utils/formatWebpackMessages';
|
|
|
8
8
|
import printBuildError from 'react-dev-utils/printBuildError';
|
|
9
9
|
import webpack from 'webpack';
|
|
10
10
|
import { packageLocation } from '@commercetools-frontend/assets';
|
|
11
|
-
import { c as createWebpackConfigForProduction } from './create-webpack-config-for-production-
|
|
11
|
+
import { c as createWebpackConfigForProduction } from './create-webpack-config-for-production-d619b595.esm.js';
|
|
12
12
|
import { p as paths } from './paths-39f22b8b.esm.js';
|
|
13
13
|
import { d as doesFileExist } from './does-file-exist-32618334.esm.js';
|
|
14
14
|
import '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
@@ -39,9 +39,9 @@ import '@babel/runtime-corejs3/core-js-stable/instance/bind';
|
|
|
39
39
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
40
40
|
import '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
41
41
|
import 'fs';
|
|
42
|
-
import './create-postcss-config-
|
|
42
|
+
import './create-postcss-config-08564589.esm.js';
|
|
43
43
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
44
|
-
import './package-
|
|
44
|
+
import './package-b717bf0d.esm.js';
|
|
45
45
|
import './optimizations-54382f7b.esm.js';
|
|
46
46
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
47
47
|
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
@@ -10,7 +10,7 @@ var formatWebpackMessages = require('react-dev-utils/formatWebpackMessages');
|
|
|
10
10
|
var printBuildError = require('react-dev-utils/printBuildError');
|
|
11
11
|
var webpack = require('webpack');
|
|
12
12
|
var assets = require('@commercetools-frontend/assets');
|
|
13
|
-
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-
|
|
13
|
+
var createWebpackConfigForProduction = require('./create-webpack-config-for-production-35502c64.cjs.prod.js');
|
|
14
14
|
var paths = require('./paths-7768b440.cjs.prod.js');
|
|
15
15
|
var doesFileExist = require('./does-file-exist-be53305d.cjs.prod.js');
|
|
16
16
|
require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
@@ -41,9 +41,9 @@ require('@babel/runtime-corejs3/core-js-stable/instance/bind');
|
|
|
41
41
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
42
42
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
43
43
|
require('fs');
|
|
44
|
-
require('./create-postcss-config-
|
|
44
|
+
require('./create-postcss-config-2b9affd5.cjs.prod.js');
|
|
45
45
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
46
|
-
require('./package-
|
|
46
|
+
require('./package-d1a1140f.cjs.prod.js');
|
|
47
47
|
require('./optimizations-da5a0cfa.cjs.prod.js');
|
|
48
48
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
49
49
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _parseInt from '@babel/runtime-corejs3/core-js-stable/parse-int';
|
|
2
2
|
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
3
3
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
4
|
-
import path
|
|
4
|
+
import path from 'path';
|
|
5
5
|
import pluginGraphql from '@rollup/plugin-graphql';
|
|
6
6
|
import pluginReact from '@vitejs/plugin-react';
|
|
7
7
|
import fs$1 from 'fs-extra';
|
|
@@ -11,6 +11,8 @@ import { analyzer } from 'vite-bundle-analyzer';
|
|
|
11
11
|
import { packageLocation } from '@commercetools-frontend/assets';
|
|
12
12
|
import { generateTemplate } from '@commercetools-frontend/mc-html-template';
|
|
13
13
|
import { p as paths } from './paths-39f22b8b.esm.js';
|
|
14
|
+
import _startsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/starts-with';
|
|
15
|
+
import { getConfigPath } from '@commercetools-frontend/application-config';
|
|
14
16
|
import { a as loadNimbusVitePlugin } from './try-load-nimbus-plugins-2f528d8f.esm.js';
|
|
15
17
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
16
18
|
import _Object$values from '@babel/runtime-corejs3/core-js-stable/object/values';
|
|
@@ -24,11 +26,12 @@ import _sortInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instanc
|
|
|
24
26
|
import { compile } from '@formatjs/cli-lib';
|
|
25
27
|
import { createFilter } from '@rollup/pluginutils';
|
|
26
28
|
import { g as getI18nMessageFormat, h as handleMessageCompilationError } from './i18n-message-complilation-21d3b0aa.esm.js';
|
|
29
|
+
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
27
30
|
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
28
31
|
import _endsWithInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/ends-with';
|
|
29
32
|
import _someInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/some';
|
|
30
33
|
import fs from 'node:fs';
|
|
31
|
-
import path from 'node:path';
|
|
34
|
+
import path$1 from 'node:path';
|
|
32
35
|
import { globSync } from 'glob';
|
|
33
36
|
import { v as vitePluginSvgr } from './vite-plugin-svgr-de6ee7da.esm.js';
|
|
34
37
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
@@ -40,6 +43,35 @@ import 'chalk';
|
|
|
40
43
|
import 'crypto';
|
|
41
44
|
import '@babel/runtime-corejs3/core-js/instance/match-all';
|
|
42
45
|
|
|
46
|
+
/**
|
|
47
|
+
* Whether the app being built is a Custom View rather than a Custom
|
|
48
|
+
* Application.
|
|
49
|
+
*
|
|
50
|
+
* Decided from which configuration file is present, which is the same signal
|
|
51
|
+
* `processConfig` itself branches on. `getConfigPath` only resolves the file's
|
|
52
|
+
* path — it does not read env vars or process the config — so this stays cheap
|
|
53
|
+
* enough for a build-time decision. `loadConfig` rejects a project carrying
|
|
54
|
+
* both files, so the two cases cannot overlap.
|
|
55
|
+
*
|
|
56
|
+
* Matched on the file name only. Against the whole path, a Custom Application
|
|
57
|
+
* living anywhere under a directory like `custom-view-config-demo/` would read
|
|
58
|
+
* as a Custom View and silently lose the optimisation.
|
|
59
|
+
*
|
|
60
|
+
* Fails open: anything unexpected (no config found, a resolution error)
|
|
61
|
+
* answers `false`, so a detection gap leaves Custom Application behaviour
|
|
62
|
+
* intact rather than silently dropping an optimisation from a real app.
|
|
63
|
+
*/
|
|
64
|
+
const isCustomView = async () => {
|
|
65
|
+
try {
|
|
66
|
+
var _context;
|
|
67
|
+
const configPath = await getConfigPath();
|
|
68
|
+
if (!configPath) return false;
|
|
69
|
+
return _startsWithInstanceProperty(_context = path.basename(configPath)).call(_context, 'custom-view-config');
|
|
70
|
+
} catch {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
43
75
|
// Type guard to help with filtering arrays for nullish elements.
|
|
44
76
|
function nonNullable(value) {
|
|
45
77
|
return value !== null && value !== undefined;
|
|
@@ -182,6 +214,145 @@ function vitePluginI18nMessageCompilation() {
|
|
|
182
214
|
};
|
|
183
215
|
}
|
|
184
216
|
|
|
217
|
+
// `application-shell-splitter` is deliberately absent. It is a root of the
|
|
218
|
+
// same wave, but it alone is ~1.2MB (Nimbus/chakra bindings) and pulls a
|
|
219
|
+
// further ~172KB `runtime` chunk, which would put ~1.5MB of high-priority
|
|
220
|
+
// preload in parallel with the 2.3MB entry that is the real critical path.
|
|
221
|
+
// Preloading it is a separate decision that needs a throttled measurement.
|
|
222
|
+
//
|
|
223
|
+
// When adding, renaming or removing a root here, update the assertion step in
|
|
224
|
+
// `.github/workflows/main.yml` to match — it checks these names by hand, so a
|
|
225
|
+
// drift makes CI pass or fail for the wrong reason.
|
|
226
|
+
const DEFAULT_ROOTS = ['navbar', 'project-container', 'user-settings-menu', 'use-applications-menu', 'requests-in-flight-loader'];
|
|
227
|
+
/**
|
|
228
|
+
* Resolves each root to its emitted chunk, then follows static `imports`
|
|
229
|
+
* transitively. The transitive walk is load-bearing rather than an
|
|
230
|
+
* optimisation: a browser is only guaranteed to preload dependencies that are
|
|
231
|
+
* listed individually, so preloading a root without its imports leaves them
|
|
232
|
+
* one round trip behind.
|
|
233
|
+
*/
|
|
234
|
+
function resolveShellChunks(bundle, roots) {
|
|
235
|
+
var _context, _context4;
|
|
236
|
+
const chunks = _filterInstanceProperty(_context = _Object$values(bundle)).call(_context, entry => entry.type === 'chunk');
|
|
237
|
+
const byFileName = new _Map(_mapInstanceProperty(chunks).call(chunks, chunk => [chunk.fileName, chunk]));
|
|
238
|
+
const fileNames = new _Set();
|
|
239
|
+
const matchedRoots = [];
|
|
240
|
+
const missingRoots = [];
|
|
241
|
+
const visit = chunk => {
|
|
242
|
+
var _context2;
|
|
243
|
+
if (fileNames.has(chunk.fileName)) return;
|
|
244
|
+
fileNames.add(chunk.fileName);
|
|
245
|
+
_forEachInstanceProperty(_context2 = chunk.imports).call(_context2, imported => {
|
|
246
|
+
const next = byFileName.get(imported);
|
|
247
|
+
if (next) visit(next);
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
_forEachInstanceProperty(roots).call(roots, root => {
|
|
251
|
+
// Prefix, not exact: Rollup suffixes chunk names it has to disambiguate,
|
|
252
|
+
// so `navbar` has to match `navbar2`. The cost is that an app's own chunk
|
|
253
|
+
// named `navbar-…` would be preloaded too — a few KB of wasted hint on a
|
|
254
|
+
// page that is about to load the real navbar anyway.
|
|
255
|
+
const hits = _filterInstanceProperty(chunks).call(chunks, chunk => {
|
|
256
|
+
var _context3;
|
|
257
|
+
return _startsWithInstanceProperty(_context3 = chunk.name).call(_context3, root);
|
|
258
|
+
});
|
|
259
|
+
if (hits.length === 0) {
|
|
260
|
+
missingRoots.push(root);
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
matchedRoots.push(root);
|
|
264
|
+
_forEachInstanceProperty(hits).call(hits, visit);
|
|
265
|
+
});
|
|
266
|
+
return {
|
|
267
|
+
fileNames: _sortInstanceProperty(_context4 = [...fileNames]).call(_context4),
|
|
268
|
+
matchedRoots,
|
|
269
|
+
missingRoots
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Emits `<link rel="modulepreload">` for the authenticated shell chunk graph,
|
|
275
|
+
* so those chunks are fetched alongside the entry instead of waiting for it to
|
|
276
|
+
* execute and discover them.
|
|
277
|
+
*
|
|
278
|
+
* Works through `build.modulePreload.resolveDependencies` rather than by
|
|
279
|
+
* injecting tags directly. That hook renders its return value through
|
|
280
|
+
* `renderBuiltUrl`, which is what applies the `__CDN_URL__` prefix; tags a
|
|
281
|
+
* `transformIndexHtml` hook creates are emitted verbatim and would ship
|
|
282
|
+
* without it.
|
|
283
|
+
*/
|
|
284
|
+
function pluginModulePreloadShellChunks() {
|
|
285
|
+
let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
286
|
+
const roots = options.roots ?? DEFAULT_ROOTS;
|
|
287
|
+
const onMissing = options.onMissing ?? 'warn';
|
|
288
|
+
let resolved = null;
|
|
289
|
+
let hasWarnedAboutOrdering = false;
|
|
290
|
+
return {
|
|
291
|
+
name: 'vite-plugin-modulepreload-shell-chunks',
|
|
292
|
+
apply: 'build',
|
|
293
|
+
config(config) {
|
|
294
|
+
// Vite's config merge would turn an explicit `false` back into an
|
|
295
|
+
// object, silently re-enabling preloading the consumer switched off.
|
|
296
|
+
if (config.build?.modulePreload === false) return;
|
|
297
|
+
return {
|
|
298
|
+
build: {
|
|
299
|
+
modulePreload: {
|
|
300
|
+
resolveDependencies: (url, deps, _ref) => {
|
|
301
|
+
let hostType = _ref.hostType;
|
|
302
|
+
// Vite calls this once for the entry HTML and once per dynamic
|
|
303
|
+
// import. Appending for `js` too would bake the shell graph into
|
|
304
|
+
// every `__vitePreload` dependency array in the bundle.
|
|
305
|
+
if (hostType !== 'html') return deps;
|
|
306
|
+
|
|
307
|
+
// Reaching the HTML host with nothing resolved means
|
|
308
|
+
// `generateBundle` has not run yet, i.e. the plugin ordering
|
|
309
|
+
// below inverted. Every hint would silently disappear, so say
|
|
310
|
+
// so. `console.warn` rather than `this.warn`: this is a plain
|
|
311
|
+
// callback in the returned config, not a Rollup plugin hook,
|
|
312
|
+
// so there is no plugin context here.
|
|
313
|
+
if (!resolved) {
|
|
314
|
+
if (!hasWarnedAboutOrdering) {
|
|
315
|
+
hasWarnedAboutOrdering = true;
|
|
316
|
+
// eslint-disable-next-line no-console
|
|
317
|
+
console.warn(`vite-plugin-modulepreload-shell-chunks: the entry HTML ` + `asked for its preload dependencies before the bundle ` + `was analysed, so no shell chunks were preloaded. This ` + `plugin relies on its \`generateBundle\` running before ` + `\`vite:build-html\`'s, which is Vite-internal ordering ` + `— a Vite upgrade may have changed it.`);
|
|
318
|
+
}
|
|
319
|
+
return deps;
|
|
320
|
+
}
|
|
321
|
+
const merged = new _Set([...deps, ...resolved.fileNames]);
|
|
322
|
+
// Every shell chunk statically imports the entry, because
|
|
323
|
+
// Rollup co-locates all shared static code there. Preloading it
|
|
324
|
+
// would duplicate the entry's own `<script type="module">`.
|
|
325
|
+
merged.delete(url);
|
|
326
|
+
return [...merged];
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
},
|
|
332
|
+
// Expected to run before `vite:build-html`'s own `generateBundle`, which
|
|
333
|
+
// is where `resolveDependencies` is invoked. That ordering is internal to
|
|
334
|
+
// Vite rather than a contract, so the hook above warns instead of
|
|
335
|
+
// assuming it held.
|
|
336
|
+
generateBundle(_options, bundle) {
|
|
337
|
+
resolved = resolveShellChunks(bundle, roots);
|
|
338
|
+
|
|
339
|
+
// A partial match is the signal that a chunk moved: the shell is present
|
|
340
|
+
// but one name no longer resolves. Resolving nothing at all is not that
|
|
341
|
+
// signal, so it stays silent rather than failing a build whose entry
|
|
342
|
+
// never reaches these modules.
|
|
343
|
+
if (resolved.missingRoots.length === 0 || resolved.matchedRoots.length === 0) {
|
|
344
|
+
return;
|
|
345
|
+
}
|
|
346
|
+
const message = `vite-plugin-modulepreload-shell-chunks: expected shell chunks were ` + `not emitted: ${resolved.missingRoots.join(', ')}.\n` + `Other shell chunks resolved (${resolved.matchedRoots.join(', ')}), so these were likely renamed or re-split rather than ` + `legitimately absent. Those modules are no longer preloaded, so the ` + `page still works but loads them a round trip later.`;
|
|
347
|
+
if (onMissing === 'error') {
|
|
348
|
+
this.error(message);
|
|
349
|
+
} else {
|
|
350
|
+
this.warn(message);
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
|
|
185
356
|
/**
|
|
186
357
|
* Only a candidate filter: which links are actually rewritten is decided by
|
|
187
358
|
* matching `href` against the CSS assets Vite really emitted (see
|
|
@@ -251,7 +422,7 @@ function pluginPostCleanup(options) {
|
|
|
251
422
|
cwd: outputDir
|
|
252
423
|
});
|
|
253
424
|
for (const file of files) {
|
|
254
|
-
const filePath = path.join(outputDir, file);
|
|
425
|
+
const filePath = path$1.join(outputDir, file);
|
|
255
426
|
try {
|
|
256
427
|
fs.unlinkSync(filePath);
|
|
257
428
|
totalFilesDeleted++;
|
|
@@ -282,7 +453,7 @@ async function run() {
|
|
|
282
453
|
});
|
|
283
454
|
|
|
284
455
|
// Generate `index.html` (template).
|
|
285
|
-
const appEntryPoint = path
|
|
456
|
+
const appEntryPoint = path.relative(paths.appRoot, paths.entryPoint);
|
|
286
457
|
const html = generateTemplate({
|
|
287
458
|
// Define the module entry point (path relative from the `/public` folder).
|
|
288
459
|
// NOTE: that this is different from the development configuration.
|
|
@@ -292,6 +463,10 @@ async function run() {
|
|
|
292
463
|
fs$1.writeFileSync(paths.appIndexHtml, html, {
|
|
293
464
|
encoding: 'utf8'
|
|
294
465
|
});
|
|
466
|
+
|
|
467
|
+
// Resolved once here rather than inside the plugin list, which is built
|
|
468
|
+
// synchronously. Only reads which config file is present.
|
|
469
|
+
const isCustomViewBuild = await isCustomView();
|
|
295
470
|
await build({
|
|
296
471
|
root: paths.appRoot,
|
|
297
472
|
base: './',
|
|
@@ -381,7 +556,14 @@ async function run() {
|
|
|
381
556
|
// Fail the build if the emitted chunk graph contains circular imports.
|
|
382
557
|
// Chunk cycles are silent at build time but crash at runtime with TDZ
|
|
383
558
|
// errors (historical "aM is undefined" from the icons/app-shell split).
|
|
384
|
-
pluginChunkCycleCheck(),
|
|
559
|
+
pluginChunkCycleCheck(),
|
|
560
|
+
// Custom Views import from the same package, so their builds emit these
|
|
561
|
+
// chunks and would carry ~128KB of preload hints for a navbar and
|
|
562
|
+
// project container `CustomViewShell` never renders. Decided from which
|
|
563
|
+
// config file is present: `getConfigPath` only resolves a path, and
|
|
564
|
+
// `loadConfig` rejects a project carrying both, so the two cases cannot
|
|
565
|
+
// overlap and this stays cheap enough for a build-time decision.
|
|
566
|
+
!isCustomViewBuild && pluginModulePreloadShellChunks(), shouldAnalyze && analyzer(analyzeOutput ? {
|
|
385
567
|
analyzerMode: 'json',
|
|
386
568
|
defaultSizes: 'stat',
|
|
387
569
|
fileName: analyzeOutput
|
|
@@ -400,12 +582,12 @@ async function run() {
|
|
|
400
582
|
// Vite will write the `index.html` to `/public/public/index.html`.
|
|
401
583
|
// We need to move this file to the `/public` folder and rename it
|
|
402
584
|
// to `index.html.template` (as expected by the `compile-html` command).
|
|
403
|
-
path
|
|
585
|
+
path.join(paths.appBuild, 'public/index.html'), paths.appIndexHtmlTemplate);
|
|
404
586
|
// Clean up nested folder
|
|
405
|
-
fs$1.rmdirSync(path
|
|
587
|
+
fs$1.rmdirSync(path.join(paths.appBuild, 'public'));
|
|
406
588
|
|
|
407
589
|
// Copy public assets
|
|
408
|
-
fs$1.copySync(path
|
|
590
|
+
fs$1.copySync(path.join(packageLocation, 'html-page'), paths.appBuild, {
|
|
409
591
|
dereference: true
|
|
410
592
|
});
|
|
411
593
|
}
|