@vercel/microfrontends 1.5.0-canary.2 → 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 CHANGED
@@ -1,30 +1,11 @@
1
1
  # @vercel/microfrontends
2
2
 
3
- ## 1.5.0-canary.2
4
-
5
- ### Patch Changes
6
-
7
- - add back asset prefix image change
8
-
9
- ## 1.5.0-canary.1
10
-
11
- ### Patch Changes
12
-
13
- - Revert asset prefix image change
14
-
15
- ## 1.5.0-canary.0
3
+ ## 1.5.0
16
4
 
17
5
  ### Minor Changes
18
6
 
19
- - Add asset prefix to next.js images using `images.path` in the next.config
20
- - Remove deprecated fields `projectId` and `localPort` from the package
21
-
22
- ## 1.4.2
23
-
24
- ### Patch Changes
25
-
26
- - df9826a: Improve repository root inference for CLI deployments. For repositories missing `.git` and `pnpm-workspace.yaml`, `@vercel/microfrontends` will now use the directory
27
- 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
28
9
 
29
10
  ## 1.4.1
30
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-canary.2",
33
+ version: "1.5.0",
34
34
  private: false,
35
35
  description: "Defines configuration and utilities for microfrontends development",
36
36
  keywords: [
@@ -1591,6 +1591,20 @@ ${indent} - Automatically redirecting all requests to local microfrontends proxy
1591
1591
  return { next };
1592
1592
  }
1593
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
+
1594
1608
  // src/next/config/transforms/rewrites.ts
1595
1609
  function debugRewrites(rewrites) {
1596
1610
  if (process.env.MFE_DEBUG) {
@@ -1623,7 +1637,7 @@ function rewritesMapToArr(rewrites) {
1623
1637
  ];
1624
1638
  });
1625
1639
  }
1626
- function transform5(args) {
1640
+ function transform6(args) {
1627
1641
  const { app, next } = args;
1628
1642
  const buildBeforeFiles = () => {
1629
1643
  const rewrites = /* @__PURE__ */ new Map();
@@ -1708,7 +1722,7 @@ var SortChunksPlugin = class {
1708
1722
  // src/next/config/transforms/webpack.ts
1709
1723
  var import_meta = {};
1710
1724
  var nextVersion = getNextJsVersion();
1711
- function transform6(args) {
1725
+ function transform7(args) {
1712
1726
  const useDefineServer = args.opts?.preferWebpackEnvironmentPlugin ? false : semver.gte(nextVersion, "15.4.0-canary.41");
1713
1727
  const { next, microfrontend, opts } = args;
1714
1728
  const configWithWebpack = {
@@ -1792,8 +1806,9 @@ var transforms = {
1792
1806
  buildId: transform2,
1793
1807
  draftMode: transform3,
1794
1808
  redirects: transform4,
1795
- rewrites: transform5,
1796
- webpack: transform6
1809
+ rewrites: transform6,
1810
+ transpilePackages: transform5,
1811
+ webpack: transform7
1797
1812
  };
1798
1813
 
1799
1814
  // src/next/config/env.ts
@@ -1858,13 +1873,13 @@ function withMicrofrontends(nextConfig, opts) {
1858
1873
  const app = microfrontends.config.getApplication(fromApp);
1859
1874
  setEnvironment({ app, microfrontends });
1860
1875
  let next = { ...nextConfig };
1861
- for (const [key, transform7] of typedEntries(transforms)) {
1876
+ for (const [key, transform8] of typedEntries(transforms)) {
1862
1877
  if (opts?.skipTransforms?.includes(key)) {
1863
1878
  console.log(`Skipping ${key} transform`);
1864
1879
  continue;
1865
1880
  }
1866
1881
  try {
1867
- const transformedConfig = transform7({
1882
+ const transformedConfig = transform8({
1868
1883
  app,
1869
1884
  next,
1870
1885
  microfrontend: microfrontends.config,