@vercel/microfrontends 1.4.0-canary.0 → 1.4.0-canary.1
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 +6 -0
- package/dist/bin/cli.cjs +1 -1
- package/dist/next/config.cjs +8 -2
- package/dist/next/config.cjs.map +1 -1
- package/dist/next/config.js +8 -2
- package/dist/next/config.js.map +1 -1
- package/package.json +1 -1
package/dist/next/config.js
CHANGED
|
@@ -1675,7 +1675,6 @@ var SortChunksPlugin = class {
|
|
|
1675
1675
|
};
|
|
1676
1676
|
|
|
1677
1677
|
// src/next/config/transforms/webpack.ts
|
|
1678
|
-
var cjsRequire = typeof __require === "function" ? __require : createRequire(import.meta.url);
|
|
1679
1678
|
var nextVersion = getNextJsVersion();
|
|
1680
1679
|
function transform6(args) {
|
|
1681
1680
|
const useDefineServer = args.opts?.preferWebpackEnvironmentPlugin ? false : semver.gte(nextVersion, "15.4.0-canary.41");
|
|
@@ -1734,8 +1733,15 @@ function transform6(args) {
|
|
|
1734
1733
|
};
|
|
1735
1734
|
}
|
|
1736
1735
|
function getNextJsVersion() {
|
|
1736
|
+
const cjsRequire = (
|
|
1737
|
+
// This is used so we can use `require.resolve` to find the Next.js package:
|
|
1738
|
+
// - `import.meta.resolve` is not available in CJS or early Node.js versions.
|
|
1739
|
+
// - tsup/esbuild don't generate import meta urls for CJS modules, so use this as
|
|
1740
|
+
// a test to see if we're running in ESM. Referencing `import.meta.url` is
|
|
1741
|
+
// still grammatically valid in CJS because esbuild transforms it.
|
|
1742
|
+
typeof import.meta.url === "string" ? createRequire(import.meta.url) : __require
|
|
1743
|
+
);
|
|
1737
1744
|
const parsedNextPackageJson = JSON.parse(
|
|
1738
|
-
// `import.meta.url` is not available in CJS or early Node.js versions
|
|
1739
1745
|
fs7.readFileSync(cjsRequire.resolve("next/package.json"), "utf8")
|
|
1740
1746
|
);
|
|
1741
1747
|
if (typeof parsedNextPackageJson !== "object" || parsedNextPackageJson === null) {
|