@commercetools-frontend/mc-scripts 24.11.0 → 24.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/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.dev.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.cjs.prod.js +1 -1
- package/application-runtime/dist/commercetools-frontend-mc-scripts-application-runtime.esm.js +1 -1
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.dev.js +13 -14
- package/cli/dist/commercetools-frontend-mc-scripts-cli.cjs.prod.js +13 -14
- package/cli/dist/commercetools-frontend-mc-scripts-cli.esm.js +13 -14
- package/dist/{build-659191e5.cjs.prod.js → build-136a1b89.cjs.prod.js} +7 -7
- package/dist/{build-4a46d4f2.esm.js → build-85028596.esm.js} +7 -7
- package/dist/{build-566e6a6f.cjs.dev.js → build-f737874d.cjs.dev.js} +7 -7
- package/dist/{build-vite-5d317720.cjs.prod.js → build-vite-4a6c90c2.cjs.prod.js} +9 -8
- package/dist/{build-vite-59e1f185.esm.js → build-vite-85211835.esm.js} +9 -8
- package/dist/{build-vite-16b1a575.cjs.dev.js → build-vite-e26f6c9f.cjs.dev.js} +9 -8
- 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/{compile-html-f4ac88cc.cjs.dev.js → compile-html-8679f721.cjs.dev.js} +5 -2
- package/dist/{compile-html-025cd493.esm.js → compile-html-adfef598.esm.js} +4 -2
- package/dist/{compile-html-50fd05ec.cjs.prod.js → compile-html-b80f9651.cjs.prod.js} +5 -2
- package/dist/{config-sync-5c9abc61.cjs.dev.js → config-sync-a6d29e7e.cjs.dev.js} +80 -69
- package/dist/{config-sync-d75c4c90.cjs.prod.js → config-sync-c2f0d0d2.cjs.prod.js} +78 -67
- package/dist/{config-sync-f6fbc36d.esm.js → config-sync-ca738e38.esm.js} +79 -69
- package/dist/{create-postcss-config-d0e65de0.esm.js → create-postcss-config-2a12c11b.esm.js} +1 -1
- package/dist/{create-postcss-config-fb85a144.cjs.prod.js → create-postcss-config-43a47b87.cjs.prod.js} +1 -1
- package/dist/{create-postcss-config-64f2da19.cjs.dev.js → create-postcss-config-7ea95e6f.cjs.dev.js} +1 -1
- package/dist/{create-webpack-config-for-development-a5f08567.cjs.prod.js → create-webpack-config-for-development-01784333.cjs.prod.js} +9 -7
- package/dist/{create-webpack-config-for-development-e5725c8d.cjs.dev.js → create-webpack-config-for-development-09988fe4.cjs.dev.js} +9 -7
- package/dist/{create-webpack-config-for-development-a77e14bc.esm.js → create-webpack-config-for-development-ca57ea56.esm.js} +9 -7
- package/dist/{create-webpack-config-for-production-f92681a6.cjs.prod.js → create-webpack-config-for-production-58d046e9.cjs.prod.js} +7 -7
- package/dist/{create-webpack-config-for-production-7a6d390e.esm.js → create-webpack-config-for-production-7b4166fc.esm.js} +7 -7
- package/dist/{create-webpack-config-for-production-c0536780.cjs.dev.js → create-webpack-config-for-production-d1699ee5.cjs.dev.js} +7 -7
- package/dist/{credentials-storage-0b89aa0e.cjs.prod.js → credentials-storage-381abf27.cjs.prod.js} +1 -1
- package/dist/{credentials-storage-4464313c.esm.js → credentials-storage-7285d7b4.esm.js} +1 -1
- package/dist/{credentials-storage-cbb5c559.cjs.dev.js → credentials-storage-de220814.cjs.dev.js} +1 -1
- package/dist/{deployment-previews-set-5ea606f0.cjs.dev.js → deployment-previews-set-6baa8fc7.cjs.dev.js} +28 -22
- package/dist/{deployment-previews-set-da359e5f.cjs.prod.js → deployment-previews-set-86ea8608.cjs.prod.js} +28 -22
- package/dist/{deployment-previews-set-f346c6db.esm.js → deployment-previews-set-8b33d390.esm.js} +27 -22
- package/dist/{graphql-requests-0bfaefaf.cjs.prod.js → graphql-requests-4ff022ec.cjs.prod.js} +8 -5
- package/dist/{graphql-requests-96bc67f5.cjs.dev.js → graphql-requests-73d961d9.cjs.dev.js} +8 -5
- package/dist/{graphql-requests-0fadb1e6.esm.js → graphql-requests-b6ca7894.esm.js} +8 -5
- package/dist/{i18n-message-complilation-7311cb29.cjs.dev.js → i18n-message-complilation-393d344a.cjs.prod.js} +1 -1
- package/dist/{i18n-message-complilation-7762da61.cjs.prod.js → i18n-message-complilation-3f80e8d6.cjs.dev.js} +1 -1
- package/dist/{i18n-message-complilation-21d3b0aa.esm.js → i18n-message-complilation-8aec9d1b.esm.js} +1 -1
- package/dist/{login-e18068ff.esm.js → login-5c212340.esm.js} +32 -23
- package/dist/{login-ae425412.cjs.dev.js → login-856475d9.cjs.dev.js} +35 -23
- package/dist/{login-cc1d6e23.cjs.prod.js → login-b4e3433c.cjs.prod.js} +35 -23
- package/dist/{optimizations-7789145e.cjs.dev.js → optimizations-ea21b802.cjs.prod.js} +8 -5
- package/dist/{optimizations-bf991634.esm.js → optimizations-ea71a24a.esm.js} +7 -5
- package/dist/{optimizations-fb93514f.cjs.prod.js → optimizations-ebbeaf88.cjs.dev.js} +8 -5
- package/dist/{package-3874f63c.cjs.prod.js → package-36c179b4.cjs.prod.js} +10 -10
- package/dist/{package-9101f68f.cjs.dev.js → package-483f057b.cjs.dev.js} +10 -10
- package/dist/{package-9710aafc.esm.js → package-85c56dad.esm.js} +10 -10
- package/dist/{paths-39f22b8b.esm.js → paths-7bf7e88e.esm.js} +9 -4
- package/dist/{paths-7768b440.cjs.prod.js → paths-af1a725a.cjs.prod.js} +10 -4
- package/dist/{paths-b76fc753.cjs.dev.js → paths-ec3e3a7d.cjs.dev.js} +10 -4
- package/dist/{serve-50d33f0b.cjs.dev.js → serve-04a03d5f.cjs.dev.js} +6 -4
- package/dist/{serve-8a506da6.cjs.prod.js → serve-2a863026.cjs.prod.js} +6 -4
- package/dist/{serve-1036c2de.esm.js → serve-fb1a0f5a.esm.js} +6 -4
- package/dist/{start-25f6f1cf.cjs.prod.js → start-33cc9cbb.cjs.prod.js} +9 -8
- package/dist/{start-01621f67.esm.js → start-654d09ae.esm.js} +9 -8
- package/dist/{start-3a463b77.cjs.dev.js → start-e28d1fec.cjs.dev.js} +9 -8
- package/dist/{start-vite-29078b3a.cjs.prod.js → start-vite-d548c121.cjs.prod.js} +4 -3
- package/dist/{start-vite-7d1161e8.esm.js → start-vite-d649d1f3.esm.js} +4 -3
- package/dist/{start-vite-068e9f73.cjs.dev.js → start-vite-eea72ba9.cjs.dev.js} +4 -3
- package/dist/{vite-plugin-svgr-de6ee7da.esm.js → vite-plugin-svgr-22c8d518.esm.js} +4 -4
- package/dist/{vite-plugin-svgr-4034a834.cjs.prod.js → vite-plugin-svgr-53ef97c7.cjs.dev.js} +4 -4
- package/dist/{vite-plugin-svgr-7d06f400.cjs.dev.js → vite-plugin-svgr-5de1cad9.cjs.prod.js} +4 -4
- package/package.json +10 -10
- 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 +6 -6
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.cjs.prod.js +6 -6
- package/webpack/dist/commercetools-frontend-mc-scripts-webpack.esm.js +6 -6
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.dev.js +1 -1
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.cjs.prod.js +1 -1
- package/webpack-loaders/i18n-message-compilation-loader/dist/commercetools-frontend-mc-scripts-webpack-loaders-i18n-message-compilation-loader.esm.js +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var pkgJson = {
|
|
4
4
|
name: "@commercetools-frontend/mc-scripts",
|
|
5
|
-
version: "24.
|
|
5
|
+
version: "24.13.0",
|
|
6
6
|
description: "Configuration and scripts for developing a MC application",
|
|
7
7
|
bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
8
8
|
repository: {
|
|
@@ -63,13 +63,13 @@ var pkgJson = {
|
|
|
63
63
|
"@babel/plugin-proposal-do-expressions": "^7.22.5",
|
|
64
64
|
"@babel/runtime": "^7.22.15",
|
|
65
65
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
66
|
-
"@commercetools-frontend/application-components": "24.
|
|
67
|
-
"@commercetools-frontend/application-config": "24.
|
|
68
|
-
"@commercetools-frontend/assets": "24.
|
|
69
|
-
"@commercetools-frontend/babel-preset-mc-app": "24.
|
|
70
|
-
"@commercetools-frontend/constants": "24.
|
|
71
|
-
"@commercetools-frontend/mc-dev-authentication": "24.
|
|
72
|
-
"@commercetools-frontend/mc-html-template": "24.
|
|
66
|
+
"@commercetools-frontend/application-components": "24.13.0",
|
|
67
|
+
"@commercetools-frontend/application-config": "24.13.0",
|
|
68
|
+
"@commercetools-frontend/assets": "24.13.0",
|
|
69
|
+
"@commercetools-frontend/babel-preset-mc-app": "24.13.0",
|
|
70
|
+
"@commercetools-frontend/constants": "24.13.0",
|
|
71
|
+
"@commercetools-frontend/mc-dev-authentication": "24.13.0",
|
|
72
|
+
"@commercetools-frontend/mc-html-template": "24.13.0",
|
|
73
73
|
"@commercetools/http-user-agent": "3.0.0",
|
|
74
74
|
"@emotion/babel-plugin": "^11.13.5",
|
|
75
75
|
"@formatjs/cli-lib": "^6.3.8",
|
|
@@ -128,7 +128,7 @@ var pkgJson = {
|
|
|
128
128
|
"terser-webpack-plugin": "5.3.14",
|
|
129
129
|
"thread-loader": "3.0.4",
|
|
130
130
|
url: "^0.11.0",
|
|
131
|
-
vite: "~6.
|
|
131
|
+
vite: "~6.4.0",
|
|
132
132
|
"vite-bundle-analyzer": "0.23.0",
|
|
133
133
|
"vite-plugin-clean-build": "^1.4.1",
|
|
134
134
|
webpack: "5.101.1",
|
|
@@ -137,7 +137,7 @@ var pkgJson = {
|
|
|
137
137
|
webpackbar: "5.0.2"
|
|
138
138
|
},
|
|
139
139
|
devDependencies: {
|
|
140
|
-
"@commercetools/composable-commerce-test-data": "13.
|
|
140
|
+
"@commercetools/composable-commerce-test-data": "13.12.0",
|
|
141
141
|
"@tsconfig/node22": "^22.0.0",
|
|
142
142
|
"@types/fs-extra": "^11.0.1",
|
|
143
143
|
"@types/lodash": "^4.14.198",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var pkgJson = {
|
|
2
2
|
name: "@commercetools-frontend/mc-scripts",
|
|
3
|
-
version: "24.
|
|
3
|
+
version: "24.13.0",
|
|
4
4
|
description: "Configuration and scripts for developing a MC application",
|
|
5
5
|
bugs: "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
repository: {
|
|
@@ -61,13 +61,13 @@ var pkgJson = {
|
|
|
61
61
|
"@babel/plugin-proposal-do-expressions": "^7.22.5",
|
|
62
62
|
"@babel/runtime": "^7.22.15",
|
|
63
63
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
64
|
-
"@commercetools-frontend/application-components": "24.
|
|
65
|
-
"@commercetools-frontend/application-config": "24.
|
|
66
|
-
"@commercetools-frontend/assets": "24.
|
|
67
|
-
"@commercetools-frontend/babel-preset-mc-app": "24.
|
|
68
|
-
"@commercetools-frontend/constants": "24.
|
|
69
|
-
"@commercetools-frontend/mc-dev-authentication": "24.
|
|
70
|
-
"@commercetools-frontend/mc-html-template": "24.
|
|
64
|
+
"@commercetools-frontend/application-components": "24.13.0",
|
|
65
|
+
"@commercetools-frontend/application-config": "24.13.0",
|
|
66
|
+
"@commercetools-frontend/assets": "24.13.0",
|
|
67
|
+
"@commercetools-frontend/babel-preset-mc-app": "24.13.0",
|
|
68
|
+
"@commercetools-frontend/constants": "24.13.0",
|
|
69
|
+
"@commercetools-frontend/mc-dev-authentication": "24.13.0",
|
|
70
|
+
"@commercetools-frontend/mc-html-template": "24.13.0",
|
|
71
71
|
"@commercetools/http-user-agent": "3.0.0",
|
|
72
72
|
"@emotion/babel-plugin": "^11.13.5",
|
|
73
73
|
"@formatjs/cli-lib": "^6.3.8",
|
|
@@ -126,7 +126,7 @@ var pkgJson = {
|
|
|
126
126
|
"terser-webpack-plugin": "5.3.14",
|
|
127
127
|
"thread-loader": "3.0.4",
|
|
128
128
|
url: "^0.11.0",
|
|
129
|
-
vite: "~6.
|
|
129
|
+
vite: "~6.4.0",
|
|
130
130
|
"vite-bundle-analyzer": "0.23.0",
|
|
131
131
|
"vite-plugin-clean-build": "^1.4.1",
|
|
132
132
|
webpack: "5.101.1",
|
|
@@ -135,7 +135,7 @@ var pkgJson = {
|
|
|
135
135
|
webpackbar: "5.0.2"
|
|
136
136
|
},
|
|
137
137
|
devDependencies: {
|
|
138
|
-
"@commercetools/composable-commerce-test-data": "13.
|
|
138
|
+
"@commercetools/composable-commerce-test-data": "13.12.0",
|
|
139
139
|
"@tsconfig/node22": "^22.0.0",
|
|
140
140
|
"@types/fs-extra": "^11.0.1",
|
|
141
141
|
"@types/lodash": "^4.14.198",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _findInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
2
|
+
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
2
3
|
import fs from 'fs';
|
|
3
4
|
import path from 'path';
|
|
4
5
|
import { d as doesFileExist } from './does-file-exist-32618334.esm.js';
|
|
@@ -12,11 +13,15 @@ const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
|
|
|
12
13
|
|
|
13
14
|
// Resolve file paths in the order given
|
|
14
15
|
const resolveModule = (resolveFn, filePath) => {
|
|
15
|
-
const extension = _findInstanceProperty(moduleFileExtensions).call(moduleFileExtensions, extension =>
|
|
16
|
+
const extension = _findInstanceProperty(moduleFileExtensions).call(moduleFileExtensions, extension => {
|
|
17
|
+
var _context;
|
|
18
|
+
return doesFileExist(resolveFn(_concatInstanceProperty(_context = "".concat(filePath, ".")).call(_context, extension)));
|
|
19
|
+
});
|
|
16
20
|
if (extension) {
|
|
17
|
-
|
|
21
|
+
var _context2;
|
|
22
|
+
return resolveFn(_concatInstanceProperty(_context2 = "".concat(filePath, ".")).call(_context2, extension));
|
|
18
23
|
}
|
|
19
|
-
return resolveFn(
|
|
24
|
+
return resolveFn("".concat(filePath, ".js"));
|
|
20
25
|
};
|
|
21
26
|
|
|
22
27
|
// Resolve the absolute path of the caller location. This is necessary
|
|
@@ -26,7 +31,7 @@ const paths = {
|
|
|
26
31
|
appBuild: resolveApp('public'),
|
|
27
32
|
appIndexHtmlTemplate: resolveApp('public/index.html.template'),
|
|
28
33
|
appIndexHtml: resolveApp('public/index.html'),
|
|
29
|
-
appWebpackConfig: resolveModule(resolveApp,
|
|
34
|
+
appWebpackConfig: resolveModule(resolveApp, "webpack.config.".concat(process.env.NODE_ENV === 'production' ? 'prod' : 'dev')),
|
|
30
35
|
yarnLockFile: resolveApp('yarn.lock'),
|
|
31
36
|
appRoot: resolveApp('.'),
|
|
32
37
|
entryPoint: resolveModule(resolveApp, 'src/index'),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
4
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
4
5
|
var fs = require('fs');
|
|
5
6
|
var path = require('path');
|
|
6
7
|
var doesFileExist = require('./does-file-exist-be53305d.cjs.prod.js');
|
|
@@ -8,6 +9,7 @@ var doesFileExist = require('./does-file-exist-be53305d.cjs.prod.js');
|
|
|
8
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
9
10
|
|
|
10
11
|
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
12
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
11
13
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
12
14
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
13
15
|
|
|
@@ -20,11 +22,15 @@ const resolveApp = relativePath => path__default["default"].resolve(appDirectory
|
|
|
20
22
|
|
|
21
23
|
// Resolve file paths in the order given
|
|
22
24
|
const resolveModule = (resolveFn, filePath) => {
|
|
23
|
-
const extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, extension =>
|
|
25
|
+
const extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, extension => {
|
|
26
|
+
var _context;
|
|
27
|
+
return doesFileExist.doesFileExist(resolveFn(_concatInstanceProperty__default["default"](_context = "".concat(filePath, ".")).call(_context, extension)));
|
|
28
|
+
});
|
|
24
29
|
if (extension) {
|
|
25
|
-
|
|
30
|
+
var _context2;
|
|
31
|
+
return resolveFn(_concatInstanceProperty__default["default"](_context2 = "".concat(filePath, ".")).call(_context2, extension));
|
|
26
32
|
}
|
|
27
|
-
return resolveFn(
|
|
33
|
+
return resolveFn("".concat(filePath, ".js"));
|
|
28
34
|
};
|
|
29
35
|
|
|
30
36
|
// Resolve the absolute path of the caller location. This is necessary
|
|
@@ -34,7 +40,7 @@ const paths = {
|
|
|
34
40
|
appBuild: resolveApp('public'),
|
|
35
41
|
appIndexHtmlTemplate: resolveApp('public/index.html.template'),
|
|
36
42
|
appIndexHtml: resolveApp('public/index.html'),
|
|
37
|
-
appWebpackConfig: resolveModule(resolveApp,
|
|
43
|
+
appWebpackConfig: resolveModule(resolveApp, "webpack.config.".concat('prod' )),
|
|
38
44
|
yarnLockFile: resolveApp('yarn.lock'),
|
|
39
45
|
appRoot: resolveApp('.'),
|
|
40
46
|
entryPoint: resolveModule(resolveApp, 'src/index'),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _findInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
4
|
+
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
4
5
|
var fs = require('fs');
|
|
5
6
|
var path = require('path');
|
|
6
7
|
var doesFileExist = require('./does-file-exist-eb86baca.cjs.dev.js');
|
|
@@ -8,6 +9,7 @@ var doesFileExist = require('./does-file-exist-eb86baca.cjs.dev.js');
|
|
|
8
9
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
9
10
|
|
|
10
11
|
var _findInstanceProperty__default = /*#__PURE__*/_interopDefault(_findInstanceProperty);
|
|
12
|
+
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
11
13
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
12
14
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
13
15
|
|
|
@@ -20,11 +22,15 @@ const resolveApp = relativePath => path__default["default"].resolve(appDirectory
|
|
|
20
22
|
|
|
21
23
|
// Resolve file paths in the order given
|
|
22
24
|
const resolveModule = (resolveFn, filePath) => {
|
|
23
|
-
const extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, extension =>
|
|
25
|
+
const extension = _findInstanceProperty__default["default"](moduleFileExtensions).call(moduleFileExtensions, extension => {
|
|
26
|
+
var _context;
|
|
27
|
+
return doesFileExist.doesFileExist(resolveFn(_concatInstanceProperty__default["default"](_context = "".concat(filePath, ".")).call(_context, extension)));
|
|
28
|
+
});
|
|
24
29
|
if (extension) {
|
|
25
|
-
|
|
30
|
+
var _context2;
|
|
31
|
+
return resolveFn(_concatInstanceProperty__default["default"](_context2 = "".concat(filePath, ".")).call(_context2, extension));
|
|
26
32
|
}
|
|
27
|
-
return resolveFn(
|
|
33
|
+
return resolveFn("".concat(filePath, ".js"));
|
|
28
34
|
};
|
|
29
35
|
|
|
30
36
|
// Resolve the absolute path of the caller location. This is necessary
|
|
@@ -34,7 +40,7 @@ const paths = {
|
|
|
34
40
|
appBuild: resolveApp('public'),
|
|
35
41
|
appIndexHtmlTemplate: resolveApp('public/index.html.template'),
|
|
36
42
|
appIndexHtml: resolveApp('public/index.html'),
|
|
37
|
-
appWebpackConfig: resolveModule(resolveApp,
|
|
43
|
+
appWebpackConfig: resolveModule(resolveApp, "webpack.config.".concat(process.env.NODE_ENV === 'production' ? 'prod' : 'dev')),
|
|
38
44
|
yarnLockFile: resolveApp('yarn.lock'),
|
|
39
45
|
appRoot: resolveApp('.'),
|
|
40
46
|
entryPoint: resolveModule(resolveApp, 'src/index'),
|
|
@@ -5,8 +5,9 @@ var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
|
|
|
5
5
|
var http = require('http');
|
|
6
6
|
var serveHandler = require('serve-handler');
|
|
7
7
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
8
|
-
var paths = require('./paths-
|
|
8
|
+
var paths = require('./paths-ec3e3a7d.cjs.dev.js');
|
|
9
9
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
10
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
10
11
|
require('fs');
|
|
11
12
|
require('path');
|
|
12
13
|
require('./does-file-exist-eb86baca.cjs.dev.js');
|
|
@@ -26,14 +27,15 @@ async function run() {
|
|
|
26
27
|
var _context;
|
|
27
28
|
// When developing against local APIs, handle the login|logout routes separately.
|
|
28
29
|
if (_startsWithInstanceProperty__default["default"](_context = applicationConfig$1.env.mcApiUrl).call(_context, 'http://localhost')) {
|
|
29
|
-
|
|
30
|
+
var _request$url, _request$url2;
|
|
31
|
+
if ((_request$url = request.url) !== null && _request$url !== void 0 && _startsWithInstanceProperty__default["default"](_request$url).call(_request$url, '/login/authorize')) {
|
|
30
32
|
const redirectTo = new _URL__default["default"](request.url, applicationConfig$1.env.mcApiUrl);
|
|
31
33
|
response.writeHead(301, {
|
|
32
34
|
Location: redirectTo.toString()
|
|
33
35
|
}).end();
|
|
34
36
|
return;
|
|
35
37
|
}
|
|
36
|
-
if (request.url
|
|
38
|
+
if ((_request$url2 = request.url) !== null && _request$url2 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url2).call(_request$url2, '/logout')) {
|
|
37
39
|
response.end('Please clear your session storage.');
|
|
38
40
|
return;
|
|
39
41
|
}
|
|
@@ -57,7 +59,7 @@ async function run() {
|
|
|
57
59
|
});
|
|
58
60
|
});
|
|
59
61
|
server.listen(port, () => {
|
|
60
|
-
console.log(
|
|
62
|
+
console.log("Running at http://localhost:".concat(port));
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -5,8 +5,9 @@ var _URL = require('@babel/runtime-corejs3/core-js-stable/url');
|
|
|
5
5
|
var http = require('http');
|
|
6
6
|
var serveHandler = require('serve-handler');
|
|
7
7
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
8
|
-
var paths = require('./paths-
|
|
8
|
+
var paths = require('./paths-af1a725a.cjs.prod.js');
|
|
9
9
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
10
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
10
11
|
require('fs');
|
|
11
12
|
require('path');
|
|
12
13
|
require('./does-file-exist-be53305d.cjs.prod.js');
|
|
@@ -26,14 +27,15 @@ async function run() {
|
|
|
26
27
|
var _context;
|
|
27
28
|
// When developing against local APIs, handle the login|logout routes separately.
|
|
28
29
|
if (_startsWithInstanceProperty__default["default"](_context = applicationConfig$1.env.mcApiUrl).call(_context, 'http://localhost')) {
|
|
29
|
-
|
|
30
|
+
var _request$url, _request$url2;
|
|
31
|
+
if ((_request$url = request.url) !== null && _request$url !== void 0 && _startsWithInstanceProperty__default["default"](_request$url).call(_request$url, '/login/authorize')) {
|
|
30
32
|
const redirectTo = new _URL__default["default"](request.url, applicationConfig$1.env.mcApiUrl);
|
|
31
33
|
response.writeHead(301, {
|
|
32
34
|
Location: redirectTo.toString()
|
|
33
35
|
}).end();
|
|
34
36
|
return;
|
|
35
37
|
}
|
|
36
|
-
if (request.url
|
|
38
|
+
if ((_request$url2 = request.url) !== null && _request$url2 !== void 0 && _startsWithInstanceProperty__default["default"](_request$url2).call(_request$url2, '/logout')) {
|
|
37
39
|
response.end('Please clear your session storage.');
|
|
38
40
|
return;
|
|
39
41
|
}
|
|
@@ -57,7 +59,7 @@ async function run() {
|
|
|
57
59
|
});
|
|
58
60
|
});
|
|
59
61
|
server.listen(port, () => {
|
|
60
|
-
console.log(
|
|
62
|
+
console.log("Running at http://localhost:".concat(port));
|
|
61
63
|
});
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -3,8 +3,9 @@ import _URL from '@babel/runtime-corejs3/core-js-stable/url';
|
|
|
3
3
|
import http from 'http';
|
|
4
4
|
import serveHandler from 'serve-handler';
|
|
5
5
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
6
|
-
import { p as paths } from './paths-
|
|
6
|
+
import { p as paths } from './paths-7bf7e88e.esm.js';
|
|
7
7
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
8
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
8
9
|
import 'fs';
|
|
9
10
|
import 'path';
|
|
10
11
|
import './does-file-exist-32618334.esm.js';
|
|
@@ -17,14 +18,15 @@ async function run() {
|
|
|
17
18
|
var _context;
|
|
18
19
|
// When developing against local APIs, handle the login|logout routes separately.
|
|
19
20
|
if (_startsWithInstanceProperty(_context = applicationConfig.env.mcApiUrl).call(_context, 'http://localhost')) {
|
|
20
|
-
|
|
21
|
+
var _request$url, _request$url2;
|
|
22
|
+
if ((_request$url = request.url) !== null && _request$url !== void 0 && _startsWithInstanceProperty(_request$url).call(_request$url, '/login/authorize')) {
|
|
21
23
|
const redirectTo = new _URL(request.url, applicationConfig.env.mcApiUrl);
|
|
22
24
|
response.writeHead(301, {
|
|
23
25
|
Location: redirectTo.toString()
|
|
24
26
|
}).end();
|
|
25
27
|
return;
|
|
26
28
|
}
|
|
27
|
-
if (request.url
|
|
29
|
+
if ((_request$url2 = request.url) !== null && _request$url2 !== void 0 && _startsWithInstanceProperty(_request$url2).call(_request$url2, '/logout')) {
|
|
28
30
|
response.end('Please clear your session storage.');
|
|
29
31
|
return;
|
|
30
32
|
}
|
|
@@ -48,7 +50,7 @@ async function run() {
|
|
|
48
50
|
});
|
|
49
51
|
});
|
|
50
52
|
server.listen(port, () => {
|
|
51
|
-
console.log(
|
|
53
|
+
console.log("Running at http://localhost:".concat(port));
|
|
52
54
|
});
|
|
53
55
|
}
|
|
54
56
|
|
|
@@ -9,8 +9,8 @@ var openBrowser = require('react-dev-utils/openBrowser');
|
|
|
9
9
|
var WebpackDevServerUtils = require('react-dev-utils/WebpackDevServerUtils');
|
|
10
10
|
var webpack = require('webpack');
|
|
11
11
|
var WebpackDevServer = require('webpack-dev-server');
|
|
12
|
-
var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-
|
|
13
|
-
var paths = require('./paths-
|
|
12
|
+
var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-01784333.cjs.prod.js');
|
|
13
|
+
var paths = require('./paths-af1a725a.cjs.prod.js');
|
|
14
14
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
15
15
|
var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
|
|
16
16
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
@@ -36,11 +36,11 @@ require('webpackbar');
|
|
|
36
36
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
37
37
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
38
38
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
39
|
-
require('./create-postcss-config-
|
|
39
|
+
require('./create-postcss-config-43a47b87.cjs.prod.js');
|
|
40
40
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
41
|
-
require('./package-
|
|
41
|
+
require('./package-36c179b4.cjs.prod.js');
|
|
42
42
|
require('./has-jsx-runtime-c3202df5.cjs.prod.js');
|
|
43
|
-
require('./optimizations-
|
|
43
|
+
require('./optimizations-ea21b802.cjs.prod.js');
|
|
44
44
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
45
45
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
46
46
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
@@ -103,17 +103,18 @@ const createWebpackDevServerConfig = async _ref => {
|
|
|
103
103
|
https: false,
|
|
104
104
|
port,
|
|
105
105
|
setupMiddlewares(middlewares, devServer) {
|
|
106
|
+
var _devServer$app;
|
|
106
107
|
if (!devServer) {
|
|
107
108
|
throw new Error('webpack-dev-server is not defined');
|
|
108
109
|
}
|
|
109
|
-
devServer.app
|
|
110
|
+
(_devServer$app = devServer.app) === null || _devServer$app === void 0 || _devServer$app.use(mcDevAuthentication.createMcDevAuthenticationMiddleware(applicationConfig$1));
|
|
110
111
|
return middlewares;
|
|
111
112
|
}
|
|
112
113
|
};
|
|
113
114
|
};
|
|
114
115
|
|
|
115
116
|
async function run() {
|
|
116
|
-
var _context;
|
|
117
|
+
var _config$output, _context;
|
|
117
118
|
const useYarn = doesFileExist.doesFileExist(paths.paths.yarnLockFile);
|
|
118
119
|
const isInteractive = process.stdout.isTTY;
|
|
119
120
|
|
|
@@ -157,7 +158,7 @@ async function run() {
|
|
|
157
158
|
// Serve webpack assets generated by the compiler over a web sever.
|
|
158
159
|
const serverConfig = await createWebpackDevServerConfig({
|
|
159
160
|
port,
|
|
160
|
-
publicPath: config.output
|
|
161
|
+
publicPath: (_config$output = config.output) === null || _config$output === void 0 ? void 0 : _config$output.publicPath
|
|
161
162
|
});
|
|
162
163
|
const devServer = new WebpackDevServer__default["default"](serverConfig, compiler);
|
|
163
164
|
await devServer.start();
|
|
@@ -7,8 +7,8 @@ import openBrowser from 'react-dev-utils/openBrowser';
|
|
|
7
7
|
import { choosePort, prepareUrls, createCompiler } from 'react-dev-utils/WebpackDevServerUtils';
|
|
8
8
|
import webpack from 'webpack';
|
|
9
9
|
import WebpackDevServer from 'webpack-dev-server';
|
|
10
|
-
import { c as createWebpackConfigForDevelopment } from './create-webpack-config-for-development-
|
|
11
|
-
import { p as paths } from './paths-
|
|
10
|
+
import { c as createWebpackConfigForDevelopment } from './create-webpack-config-for-development-ca57ea56.esm.js';
|
|
11
|
+
import { p as paths } from './paths-7bf7e88e.esm.js';
|
|
12
12
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
13
13
|
import { createMcDevAuthenticationMiddleware } from '@commercetools-frontend/mc-dev-authentication';
|
|
14
14
|
import { processHeaders } from '@commercetools-frontend/mc-html-template';
|
|
@@ -34,11 +34,11 @@ import 'webpackbar';
|
|
|
34
34
|
import '@babel/runtime-corejs3/helpers/classCallCheck';
|
|
35
35
|
import '@babel/runtime-corejs3/helpers/createClass';
|
|
36
36
|
import '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
37
|
-
import './create-postcss-config-
|
|
37
|
+
import './create-postcss-config-2a12c11b.esm.js';
|
|
38
38
|
import '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
39
|
-
import './package-
|
|
39
|
+
import './package-85c56dad.esm.js';
|
|
40
40
|
import './has-jsx-runtime-e3ecb09b.esm.js';
|
|
41
|
-
import './optimizations-
|
|
41
|
+
import './optimizations-ea71a24a.esm.js';
|
|
42
42
|
import '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
43
43
|
import '@babel/runtime-corejs3/core-js-stable/object/entries';
|
|
44
44
|
import '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
@@ -90,17 +90,18 @@ const createWebpackDevServerConfig = async _ref => {
|
|
|
90
90
|
https: false,
|
|
91
91
|
port,
|
|
92
92
|
setupMiddlewares(middlewares, devServer) {
|
|
93
|
+
var _devServer$app;
|
|
93
94
|
if (!devServer) {
|
|
94
95
|
throw new Error('webpack-dev-server is not defined');
|
|
95
96
|
}
|
|
96
|
-
devServer.app
|
|
97
|
+
(_devServer$app = devServer.app) === null || _devServer$app === void 0 || _devServer$app.use(createMcDevAuthenticationMiddleware(applicationConfig));
|
|
97
98
|
return middlewares;
|
|
98
99
|
}
|
|
99
100
|
};
|
|
100
101
|
};
|
|
101
102
|
|
|
102
103
|
async function run() {
|
|
103
|
-
var _context;
|
|
104
|
+
var _config$output, _context;
|
|
104
105
|
const useYarn = doesFileExist(paths.yarnLockFile);
|
|
105
106
|
const isInteractive = process.stdout.isTTY;
|
|
106
107
|
|
|
@@ -144,7 +145,7 @@ async function run() {
|
|
|
144
145
|
// Serve webpack assets generated by the compiler over a web sever.
|
|
145
146
|
const serverConfig = await createWebpackDevServerConfig({
|
|
146
147
|
port,
|
|
147
|
-
publicPath: config.output
|
|
148
|
+
publicPath: (_config$output = config.output) === null || _config$output === void 0 ? void 0 : _config$output.publicPath
|
|
148
149
|
});
|
|
149
150
|
const devServer = new WebpackDevServer(serverConfig, compiler);
|
|
150
151
|
await devServer.start();
|
|
@@ -9,8 +9,8 @@ var openBrowser = require('react-dev-utils/openBrowser');
|
|
|
9
9
|
var WebpackDevServerUtils = require('react-dev-utils/WebpackDevServerUtils');
|
|
10
10
|
var webpack = require('webpack');
|
|
11
11
|
var WebpackDevServer = require('webpack-dev-server');
|
|
12
|
-
var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-
|
|
13
|
-
var paths = require('./paths-
|
|
12
|
+
var createWebpackConfigForDevelopment = require('./create-webpack-config-for-development-09988fe4.cjs.dev.js');
|
|
13
|
+
var paths = require('./paths-ec3e3a7d.cjs.dev.js');
|
|
14
14
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
15
15
|
var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
|
|
16
16
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
@@ -36,11 +36,11 @@ require('webpackbar');
|
|
|
36
36
|
require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
37
37
|
require('@babel/runtime-corejs3/helpers/createClass');
|
|
38
38
|
require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
39
|
-
require('./create-postcss-config-
|
|
39
|
+
require('./create-postcss-config-7ea95e6f.cjs.dev.js');
|
|
40
40
|
require('@babel/runtime-corejs3/helpers/slicedToArray');
|
|
41
|
-
require('./package-
|
|
41
|
+
require('./package-483f057b.cjs.dev.js');
|
|
42
42
|
require('./has-jsx-runtime-aa5d21ee.cjs.dev.js');
|
|
43
|
-
require('./optimizations-
|
|
43
|
+
require('./optimizations-ebbeaf88.cjs.dev.js');
|
|
44
44
|
require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
45
45
|
require('@babel/runtime-corejs3/core-js-stable/object/entries');
|
|
46
46
|
require('@babel/runtime-corejs3/core-js-stable/instance/includes');
|
|
@@ -103,17 +103,18 @@ const createWebpackDevServerConfig = async _ref => {
|
|
|
103
103
|
https: false,
|
|
104
104
|
port,
|
|
105
105
|
setupMiddlewares(middlewares, devServer) {
|
|
106
|
+
var _devServer$app;
|
|
106
107
|
if (!devServer) {
|
|
107
108
|
throw new Error('webpack-dev-server is not defined');
|
|
108
109
|
}
|
|
109
|
-
devServer.app
|
|
110
|
+
(_devServer$app = devServer.app) === null || _devServer$app === void 0 || _devServer$app.use(mcDevAuthentication.createMcDevAuthenticationMiddleware(applicationConfig$1));
|
|
110
111
|
return middlewares;
|
|
111
112
|
}
|
|
112
113
|
};
|
|
113
114
|
};
|
|
114
115
|
|
|
115
116
|
async function run() {
|
|
116
|
-
var _context;
|
|
117
|
+
var _config$output, _context;
|
|
117
118
|
const useYarn = doesFileExist.doesFileExist(paths.paths.yarnLockFile);
|
|
118
119
|
const isInteractive = process.stdout.isTTY;
|
|
119
120
|
|
|
@@ -157,7 +158,7 @@ async function run() {
|
|
|
157
158
|
// Serve webpack assets generated by the compiler over a web sever.
|
|
158
159
|
const serverConfig = await createWebpackDevServerConfig({
|
|
159
160
|
port,
|
|
160
|
-
publicPath: config.output
|
|
161
|
+
publicPath: (_config$output = config.output) === null || _config$output === void 0 ? void 0 : _config$output.publicPath
|
|
161
162
|
});
|
|
162
163
|
const devServer = new WebpackDevServer__default["default"](serverConfig, compiler);
|
|
163
164
|
await devServer.start();
|
|
@@ -10,11 +10,12 @@ var vite = require('vite');
|
|
|
10
10
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
11
11
|
var assets = require('@commercetools-frontend/assets');
|
|
12
12
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
13
|
-
var paths = require('./paths-
|
|
13
|
+
var paths = require('./paths-af1a725a.cjs.prod.js');
|
|
14
14
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
15
15
|
var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
|
|
16
|
-
var vitePluginSvgr = require('./vite-plugin-svgr-
|
|
16
|
+
var vitePluginSvgr = require('./vite-plugin-svgr-5de1cad9.cjs.prod.js');
|
|
17
17
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
18
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
18
19
|
require('fs');
|
|
19
20
|
require('./does-file-exist-be53305d.cjs.prod.js');
|
|
20
21
|
require('node:fs');
|
|
@@ -94,7 +95,7 @@ async function run() {
|
|
|
94
95
|
const html = mcHtmlTemplate.generateTemplate({
|
|
95
96
|
// Define the module entry point (path relative to the `/public` folder).
|
|
96
97
|
// NOTE: that this is different from the production configuration.
|
|
97
|
-
scriptImports: [
|
|
98
|
+
scriptImports: ["<script type=\"module\" src=\"/../".concat(appEntryPoint, "\" defer></script>")]
|
|
98
99
|
});
|
|
99
100
|
// Write `index.html` (template) into the `/public` folder.
|
|
100
101
|
fs__default["default"].writeFileSync(paths.paths.appIndexHtml, html, {
|
|
@@ -8,11 +8,12 @@ import { createServer } from 'vite';
|
|
|
8
8
|
import { processConfig } from '@commercetools-frontend/application-config';
|
|
9
9
|
import { packageLocation } from '@commercetools-frontend/assets';
|
|
10
10
|
import { processHeaders, replaceHtmlPlaceholders, generateTemplate } from '@commercetools-frontend/mc-html-template';
|
|
11
|
-
import { p as paths } from './paths-
|
|
11
|
+
import { p as paths } from './paths-7bf7e88e.esm.js';
|
|
12
12
|
import _Object$assign from '@babel/runtime-corejs3/core-js-stable/object/assign';
|
|
13
13
|
import { createMcDevAuthenticationMiddleware } from '@commercetools-frontend/mc-dev-authentication';
|
|
14
|
-
import { v as vitePluginSvgr } from './vite-plugin-svgr-
|
|
14
|
+
import { v as vitePluginSvgr } from './vite-plugin-svgr-22c8d518.esm.js';
|
|
15
15
|
import '@babel/runtime-corejs3/core-js-stable/instance/find';
|
|
16
|
+
import '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
16
17
|
import 'fs';
|
|
17
18
|
import './does-file-exist-32618334.esm.js';
|
|
18
19
|
import 'node:fs';
|
|
@@ -82,7 +83,7 @@ async function run() {
|
|
|
82
83
|
const html = generateTemplate({
|
|
83
84
|
// Define the module entry point (path relative to the `/public` folder).
|
|
84
85
|
// NOTE: that this is different from the production configuration.
|
|
85
|
-
scriptImports: [
|
|
86
|
+
scriptImports: ["<script type=\"module\" src=\"/../".concat(appEntryPoint, "\" defer></script>")]
|
|
86
87
|
});
|
|
87
88
|
// Write `index.html` (template) into the `/public` folder.
|
|
88
89
|
fs.writeFileSync(paths.appIndexHtml, html, {
|
|
@@ -10,11 +10,12 @@ var vite = require('vite');
|
|
|
10
10
|
var applicationConfig = require('@commercetools-frontend/application-config');
|
|
11
11
|
var assets = require('@commercetools-frontend/assets');
|
|
12
12
|
var mcHtmlTemplate = require('@commercetools-frontend/mc-html-template');
|
|
13
|
-
var paths = require('./paths-
|
|
13
|
+
var paths = require('./paths-ec3e3a7d.cjs.dev.js');
|
|
14
14
|
var _Object$assign = require('@babel/runtime-corejs3/core-js-stable/object/assign');
|
|
15
15
|
var mcDevAuthentication = require('@commercetools-frontend/mc-dev-authentication');
|
|
16
|
-
var vitePluginSvgr = require('./vite-plugin-svgr-
|
|
16
|
+
var vitePluginSvgr = require('./vite-plugin-svgr-53ef97c7.cjs.dev.js');
|
|
17
17
|
require('@babel/runtime-corejs3/core-js-stable/instance/find');
|
|
18
|
+
require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
18
19
|
require('fs');
|
|
19
20
|
require('./does-file-exist-eb86baca.cjs.dev.js');
|
|
20
21
|
require('node:fs');
|
|
@@ -94,7 +95,7 @@ async function run() {
|
|
|
94
95
|
const html = mcHtmlTemplate.generateTemplate({
|
|
95
96
|
// Define the module entry point (path relative to the `/public` folder).
|
|
96
97
|
// NOTE: that this is different from the production configuration.
|
|
97
|
-
scriptImports: [
|
|
98
|
+
scriptImports: ["<script type=\"module\" src=\"/../".concat(appEntryPoint, "\" defer></script>")]
|
|
98
99
|
});
|
|
99
100
|
// Write `index.html` (template) into the `/public` folder.
|
|
100
101
|
fs__default["default"].writeFileSync(paths.paths.appIndexHtml, html, {
|
|
@@ -5,7 +5,7 @@ import { transformWithEsbuild } from 'vite';
|
|
|
5
5
|
import _matchAllInstanceProperty from '@babel/runtime-corejs3/core-js/instance/match-all';
|
|
6
6
|
|
|
7
7
|
async function optimizeEmbeddedPngs(code, id) {
|
|
8
|
-
const pngRegex = /href="data:image\/png;base64,([a-zA-Z0-9+/]+=*)"/
|
|
8
|
+
const pngRegex = /href="data:image\/png;base64,([a-zA-Z0-9+/]+=*)"/g;
|
|
9
9
|
let modifiedCode = code;
|
|
10
10
|
const matchesIterator = _matchAllInstanceProperty(code).call(code, pngRegex);
|
|
11
11
|
for (const match of matchesIterator) {
|
|
@@ -14,7 +14,7 @@ async function optimizeEmbeddedPngs(code, id) {
|
|
|
14
14
|
// This length would indicate that the match is greater than ~1mb
|
|
15
15
|
if (originalBase64.length > 1000000) {
|
|
16
16
|
const fileName = id.split('/').pop();
|
|
17
|
-
console.warn(
|
|
17
|
+
console.warn("\n\uD83D\uDEA8 You have a large png embedded in ".concat(fileName, " - consider using an image tag instead \uD83D\uDEA8"));
|
|
18
18
|
try {
|
|
19
19
|
const pngBuffer = Buffer.from(originalBase64, 'base64');
|
|
20
20
|
const sharp = (await import('sharp')).default;
|
|
@@ -97,9 +97,9 @@ function vitePluginSvgr() {
|
|
|
97
97
|
name: 'prefixIds',
|
|
98
98
|
params: {
|
|
99
99
|
delim: '',
|
|
100
|
-
prefix: (_, info) =>
|
|
100
|
+
prefix: (_, info) => "svg".concat(crypto.createHash('shake256', {
|
|
101
101
|
outputLength: 6
|
|
102
|
-
}).update(info.path || '').digest('hex')
|
|
102
|
+
}).update(info.path || '').digest('hex'))
|
|
103
103
|
}
|
|
104
104
|
}]
|
|
105
105
|
}
|