@vercel/microfrontends 1.5.0-canary.1 → 1.5.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/CHANGELOG.md +3 -16
- package/dist/bin/cli.cjs +1 -1
- package/dist/next/config.cjs +25 -6
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.d.ts +1 -1
- package/dist/next/config.js +25 -6
- package/dist/next/config.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
# @vercel/microfrontends
|
|
2
2
|
|
|
3
|
-
## 1.5.0
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- Revert asset prefix image change
|
|
8
|
-
|
|
9
|
-
## 1.5.0-canary.0
|
|
3
|
+
## 1.5.0
|
|
10
4
|
|
|
11
5
|
### Minor Changes
|
|
12
6
|
|
|
13
|
-
-
|
|
14
|
-
- Remove deprecated fields `projectId` and `localPort` from the package
|
|
15
|
-
|
|
16
|
-
## 1.4.2
|
|
17
|
-
|
|
18
|
-
### Patch Changes
|
|
19
|
-
|
|
20
|
-
- df9826a: Improve repository root inference for CLI deployments. For repositories missing `.git` and `pnpm-workspace.yaml`, `@vercel/microfrontends` will now use the directory
|
|
21
|
-
closest to the root that contains a `package.json` as the root of the repository.
|
|
7
|
+
- 003d24b: - Automatically add asset prefix to Next.js images using `images.path` in `next.config.js`.
|
|
8
|
+
- Remove deprecated fields `projectId` and `localPort` from the package
|
|
22
9
|
|
|
23
10
|
## 1.4.1
|
|
24
11
|
|
package/dist/bin/cli.cjs
CHANGED
|
@@ -30,7 +30,7 @@ var import_env = require("@next/env");
|
|
|
30
30
|
// package.json
|
|
31
31
|
var package_default = {
|
|
32
32
|
name: "@vercel/microfrontends",
|
|
33
|
-
version: "1.5.0
|
|
33
|
+
version: "1.5.0",
|
|
34
34
|
private: false,
|
|
35
35
|
description: "Defines configuration and utilities for microfrontends development",
|
|
36
36
|
keywords: [
|
package/dist/next/config.cjs
CHANGED
|
@@ -1501,6 +1501,10 @@ function transform(args) {
|
|
|
1501
1501
|
);
|
|
1502
1502
|
}
|
|
1503
1503
|
next.assetPrefix = assetPrefix;
|
|
1504
|
+
next.images = {
|
|
1505
|
+
...next.images,
|
|
1506
|
+
path: `${assetPrefix}/_next/image`
|
|
1507
|
+
};
|
|
1504
1508
|
return {
|
|
1505
1509
|
next
|
|
1506
1510
|
};
|
|
@@ -1587,6 +1591,20 @@ ${indent} - Automatically redirecting all requests to local microfrontends proxy
|
|
|
1587
1591
|
return { next };
|
|
1588
1592
|
}
|
|
1589
1593
|
|
|
1594
|
+
// src/next/config/transforms/transpile-packages.ts
|
|
1595
|
+
function transform5(args) {
|
|
1596
|
+
const { next } = args;
|
|
1597
|
+
if (next.transpilePackages === void 0 || !next.transpilePackages.includes("@vercel/microfrontends")) {
|
|
1598
|
+
next.transpilePackages = [
|
|
1599
|
+
...next.transpilePackages || [],
|
|
1600
|
+
"@vercel/microfrontends"
|
|
1601
|
+
];
|
|
1602
|
+
}
|
|
1603
|
+
return {
|
|
1604
|
+
next
|
|
1605
|
+
};
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1590
1608
|
// src/next/config/transforms/rewrites.ts
|
|
1591
1609
|
function debugRewrites(rewrites) {
|
|
1592
1610
|
if (process.env.MFE_DEBUG) {
|
|
@@ -1619,7 +1637,7 @@ function rewritesMapToArr(rewrites) {
|
|
|
1619
1637
|
];
|
|
1620
1638
|
});
|
|
1621
1639
|
}
|
|
1622
|
-
function
|
|
1640
|
+
function transform6(args) {
|
|
1623
1641
|
const { app, next } = args;
|
|
1624
1642
|
const buildBeforeFiles = () => {
|
|
1625
1643
|
const rewrites = /* @__PURE__ */ new Map();
|
|
@@ -1704,7 +1722,7 @@ var SortChunksPlugin = class {
|
|
|
1704
1722
|
// src/next/config/transforms/webpack.ts
|
|
1705
1723
|
var import_meta = {};
|
|
1706
1724
|
var nextVersion = getNextJsVersion();
|
|
1707
|
-
function
|
|
1725
|
+
function transform7(args) {
|
|
1708
1726
|
const useDefineServer = args.opts?.preferWebpackEnvironmentPlugin ? false : semver.gte(nextVersion, "15.4.0-canary.41");
|
|
1709
1727
|
const { next, microfrontend, opts } = args;
|
|
1710
1728
|
const configWithWebpack = {
|
|
@@ -1788,8 +1806,9 @@ var transforms = {
|
|
|
1788
1806
|
buildId: transform2,
|
|
1789
1807
|
draftMode: transform3,
|
|
1790
1808
|
redirects: transform4,
|
|
1791
|
-
rewrites:
|
|
1792
|
-
|
|
1809
|
+
rewrites: transform6,
|
|
1810
|
+
transpilePackages: transform5,
|
|
1811
|
+
webpack: transform7
|
|
1793
1812
|
};
|
|
1794
1813
|
|
|
1795
1814
|
// src/next/config/env.ts
|
|
@@ -1854,13 +1873,13 @@ function withMicrofrontends(nextConfig, opts) {
|
|
|
1854
1873
|
const app = microfrontends.config.getApplication(fromApp);
|
|
1855
1874
|
setEnvironment({ app, microfrontends });
|
|
1856
1875
|
let next = { ...nextConfig };
|
|
1857
|
-
for (const [key,
|
|
1876
|
+
for (const [key, transform8] of typedEntries(transforms)) {
|
|
1858
1877
|
if (opts?.skipTransforms?.includes(key)) {
|
|
1859
1878
|
console.log(`Skipping ${key} transform`);
|
|
1860
1879
|
continue;
|
|
1861
1880
|
}
|
|
1862
1881
|
try {
|
|
1863
|
-
const transformedConfig =
|
|
1882
|
+
const transformedConfig = transform8({
|
|
1864
1883
|
app,
|
|
1865
1884
|
next,
|
|
1866
1885
|
microfrontend: microfrontends.config,
|