vite-plugin-storybook-nextjs 1.1.0--canary.27.f775ea2.0 → 1.1.0--canary.27.ea73e5f.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/dist/index.cjs +53 -53
- package/dist/index.js +53 -53
- package/dist/mocks/storybook.global.cjs +39 -39
- package/dist/mocks/storybook.global.js +39 -39
- package/package.json +4 -2
package/dist/index.cjs
CHANGED
|
@@ -65,13 +65,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
65
65
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
66
66
|
var __getProtoOf = Object.getPrototypeOf;
|
|
67
67
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
68
|
-
var
|
|
69
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
70
|
-
}) : x)(function(x) {
|
|
71
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
72
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
73
|
-
});
|
|
74
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
68
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
75
69
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
76
70
|
};
|
|
77
71
|
var __copyProps = (to, from, except, desc) => {
|
|
@@ -2781,13 +2775,14 @@ function vitePluginNextImage(nextConfigResolver) {
|
|
|
2781
2775
|
|
|
2782
2776
|
// src/plugins/next-mocks/compatibility/compatibility-map.ts
|
|
2783
2777
|
var import_semver = __toESM(require_semver2());
|
|
2784
|
-
var
|
|
2778
|
+
var require5 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
|
|
2779
|
+
var getNextjsVersion = () => require5(scopedResolve("next/package.json")).version;
|
|
2785
2780
|
var scopedResolve = (id) => {
|
|
2786
2781
|
let scopedModulePath;
|
|
2787
2782
|
try {
|
|
2788
|
-
scopedModulePath =
|
|
2783
|
+
scopedModulePath = require5.resolve(id, { paths: [path2.resolve()] });
|
|
2789
2784
|
} catch (e) {
|
|
2790
|
-
scopedModulePath =
|
|
2785
|
+
scopedModulePath = require5.resolve(id);
|
|
2791
2786
|
}
|
|
2792
2787
|
const idWithNativePathSep = id.replace(/\//g, path2.sep);
|
|
2793
2788
|
if (scopedModulePath.endsWith(idWithNativePathSep)) {
|
|
@@ -2799,59 +2794,64 @@ var scopedResolve = (id) => {
|
|
|
2799
2794
|
};
|
|
2800
2795
|
|
|
2801
2796
|
// src/plugins/next-mocks/compatibility/compatibility-map.ts
|
|
2802
|
-
var
|
|
2797
|
+
var require6 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
|
|
2798
|
+
var getEntryPoint2 = (subPath, env) => require6.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
|
|
2799
|
+
var mapping = (env) => ({
|
|
2803
2800
|
"<15.0.0": {
|
|
2804
2801
|
"next/dist/server/request/headers": "next/dist/client/components/headers",
|
|
2805
2802
|
// this path only exists from Next 15 onwards
|
|
2806
|
-
"next/dist/server/request/draft-mode":
|
|
2803
|
+
"next/dist/server/request/draft-mode": getEntryPoint2(
|
|
2804
|
+
"draft-mode.compat",
|
|
2805
|
+
env
|
|
2806
|
+
)
|
|
2807
2807
|
}
|
|
2808
|
-
};
|
|
2809
|
-
var getCompatibilityAliases = () => {
|
|
2808
|
+
});
|
|
2809
|
+
var getCompatibilityAliases = (env) => {
|
|
2810
2810
|
const version = getNextjsVersion();
|
|
2811
2811
|
const result = {};
|
|
2812
2812
|
Object.keys(mapping).forEach((key) => {
|
|
2813
2813
|
if (import_semver.default.intersects(version, key)) {
|
|
2814
|
-
Object.assign(result, mapping[key]);
|
|
2814
|
+
Object.assign(result, mapping(env)[key]);
|
|
2815
2815
|
}
|
|
2816
2816
|
});
|
|
2817
2817
|
return result;
|
|
2818
2818
|
};
|
|
2819
2819
|
|
|
2820
2820
|
// src/plugins/next-mocks/plugin.ts
|
|
2821
|
-
var
|
|
2822
|
-
var
|
|
2821
|
+
var require7 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
|
|
2822
|
+
var getEntryPoint3 = (subPath, env) => require7.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
|
|
2823
2823
|
var getAlias2 = (env) => ({
|
|
2824
|
-
"next/headers":
|
|
2825
|
-
"@storybook/nextjs/headers.mock":
|
|
2826
|
-
"@storybook/nextjs-vite/headers.mock":
|
|
2827
|
-
"@storybook/experimental-nextjs-vite/headers.mock":
|
|
2824
|
+
"next/headers": getEntryPoint3("headers", env),
|
|
2825
|
+
"@storybook/nextjs/headers.mock": getEntryPoint3("headers", env),
|
|
2826
|
+
"@storybook/nextjs-vite/headers.mock": getEntryPoint3("headers", env),
|
|
2827
|
+
"@storybook/experimental-nextjs-vite/headers.mock": getEntryPoint3(
|
|
2828
2828
|
"headers",
|
|
2829
2829
|
env
|
|
2830
2830
|
),
|
|
2831
|
-
"next/navigation":
|
|
2832
|
-
"@storybook/nextjs/navigation.mock":
|
|
2833
|
-
"@storybook/nextjs-vite/navigation.mock":
|
|
2834
|
-
"@storybook/experimental-nextjs-vite/navigation.mock":
|
|
2831
|
+
"next/navigation": getEntryPoint3("navigation", env),
|
|
2832
|
+
"@storybook/nextjs/navigation.mock": getEntryPoint3("navigation", env),
|
|
2833
|
+
"@storybook/nextjs-vite/navigation.mock": getEntryPoint3("navigation", env),
|
|
2834
|
+
"@storybook/experimental-nextjs-vite/navigation.mock": getEntryPoint3(
|
|
2835
2835
|
"navigation",
|
|
2836
2836
|
env
|
|
2837
2837
|
),
|
|
2838
|
-
"next/router":
|
|
2839
|
-
"@storybook/nextjs/router.mock":
|
|
2840
|
-
"@storybook/nextjs-vite/router.mock":
|
|
2841
|
-
"@storybook/experimental-nextjs-vite/router.mock":
|
|
2838
|
+
"next/router": getEntryPoint3("router", env),
|
|
2839
|
+
"@storybook/nextjs/router.mock": getEntryPoint3("router", env),
|
|
2840
|
+
"@storybook/nextjs-vite/router.mock": getEntryPoint3("router", env),
|
|
2841
|
+
"@storybook/experimental-nextjs-vite/router.mock": getEntryPoint3(
|
|
2842
2842
|
"router",
|
|
2843
2843
|
env
|
|
2844
2844
|
),
|
|
2845
|
-
"next/cache":
|
|
2846
|
-
"@storybook/nextjs/cache.mock":
|
|
2847
|
-
"@storybook/nextjs-vite/cache.mock":
|
|
2848
|
-
"@storybook/experimental-nextjs-vite/cache.mock":
|
|
2849
|
-
"server-only":
|
|
2850
|
-
"@opentelemetry/api":
|
|
2845
|
+
"next/cache": getEntryPoint3("cache", env),
|
|
2846
|
+
"@storybook/nextjs/cache.mock": getEntryPoint3("cache", env),
|
|
2847
|
+
"@storybook/nextjs-vite/cache.mock": getEntryPoint3("cache", env),
|
|
2848
|
+
"@storybook/experimental-nextjs-vite/cache.mock": getEntryPoint3("cache", env),
|
|
2849
|
+
"server-only": getEntryPoint3("server-only", env),
|
|
2850
|
+
"@opentelemetry/api": require7.resolve(
|
|
2851
2851
|
"next/dist/compiled/@opentelemetry/api"
|
|
2852
2852
|
),
|
|
2853
|
-
"next/dynamic":
|
|
2854
|
-
...getCompatibilityAliases()
|
|
2853
|
+
"next/dynamic": getEntryPoint3("dynamic", env),
|
|
2854
|
+
...getCompatibilityAliases(env)
|
|
2855
2855
|
});
|
|
2856
2856
|
var vitePluginNextMocks = () => ({
|
|
2857
2857
|
name: "vite-plugin-next-mocks",
|
|
@@ -2866,7 +2866,7 @@ var vitePluginNextMocks = () => ({
|
|
|
2866
2866
|
});
|
|
2867
2867
|
|
|
2868
2868
|
// src/index.ts
|
|
2869
|
-
var
|
|
2869
|
+
var require8 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
|
|
2870
2870
|
var loadConfig = (
|
|
2871
2871
|
// biome-ignore lint/suspicious/noExplicitAny: CJS support
|
|
2872
2872
|
nextServerConfig__default.default.default || nextServerConfig__default.default
|
|
@@ -2888,33 +2888,33 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
2888
2888
|
alias: [
|
|
2889
2889
|
{
|
|
2890
2890
|
find: /^react$/,
|
|
2891
|
-
replacement:
|
|
2891
|
+
replacement: require8.resolve("next/dist/compiled/react")
|
|
2892
2892
|
},
|
|
2893
2893
|
{
|
|
2894
2894
|
find: /^react-dom$/,
|
|
2895
|
-
replacement:
|
|
2895
|
+
replacement: require8.resolve("next/dist/compiled/react-dom")
|
|
2896
2896
|
},
|
|
2897
2897
|
{
|
|
2898
2898
|
find: /^react-dom\/server$/,
|
|
2899
|
-
replacement:
|
|
2899
|
+
replacement: require8.resolve(
|
|
2900
2900
|
"next/dist/compiled/react-dom/server.browser.js"
|
|
2901
2901
|
)
|
|
2902
2902
|
},
|
|
2903
2903
|
{
|
|
2904
2904
|
find: /^react-dom\/test-utils$/,
|
|
2905
|
-
replacement:
|
|
2905
|
+
replacement: require8.resolve(
|
|
2906
2906
|
"next/dist/compiled/react-dom/cjs/react-dom-test-utils.production.js"
|
|
2907
2907
|
)
|
|
2908
2908
|
},
|
|
2909
2909
|
{
|
|
2910
2910
|
find: /^react-dom\/client$/,
|
|
2911
|
-
replacement:
|
|
2911
|
+
replacement: require8.resolve(
|
|
2912
2912
|
"next/dist/compiled/react-dom/client.js"
|
|
2913
2913
|
)
|
|
2914
2914
|
},
|
|
2915
2915
|
{
|
|
2916
2916
|
find: /^react-dom\/cjs\/react-dom\.development\.js$/,
|
|
2917
|
-
replacement:
|
|
2917
|
+
replacement: require8.resolve(
|
|
2918
2918
|
"next/dist/compiled/react-dom/cjs/react-dom.development.js"
|
|
2919
2919
|
)
|
|
2920
2920
|
}
|
|
@@ -2934,26 +2934,26 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
2934
2934
|
},
|
|
2935
2935
|
test: {
|
|
2936
2936
|
alias: {
|
|
2937
|
-
"react/jsx-dev-runtime":
|
|
2937
|
+
"react/jsx-dev-runtime": require8.resolve(
|
|
2938
2938
|
"next/dist/compiled/react/jsx-dev-runtime.js"
|
|
2939
2939
|
),
|
|
2940
|
-
"react/jsx-runtime":
|
|
2940
|
+
"react/jsx-runtime": require8.resolve(
|
|
2941
2941
|
"next/dist/compiled/react/jsx-runtime.js"
|
|
2942
2942
|
),
|
|
2943
|
-
react:
|
|
2944
|
-
"react-dom/server":
|
|
2943
|
+
react: require8.resolve("next/dist/compiled/react"),
|
|
2944
|
+
"react-dom/server": require8.resolve(
|
|
2945
2945
|
executionEnvironment === "node" ? "next/dist/compiled/react-dom/server.js" : "next/dist/compiled/react-dom/server.browser.js"
|
|
2946
2946
|
),
|
|
2947
|
-
"react-dom/test-utils":
|
|
2947
|
+
"react-dom/test-utils": require8.resolve(
|
|
2948
2948
|
"next/dist/compiled/react-dom/cjs/react-dom-test-utils.production.js"
|
|
2949
2949
|
),
|
|
2950
|
-
"react-dom/cjs/react-dom.development.js":
|
|
2950
|
+
"react-dom/cjs/react-dom.development.js": require8.resolve(
|
|
2951
2951
|
"next/dist/compiled/react-dom/cjs/react-dom.development.js"
|
|
2952
2952
|
),
|
|
2953
|
-
"react-dom/client":
|
|
2953
|
+
"react-dom/client": require8.resolve(
|
|
2954
2954
|
"next/dist/compiled/react-dom/client.js"
|
|
2955
2955
|
),
|
|
2956
|
-
"react-dom":
|
|
2956
|
+
"react-dom": require8.resolve("next/dist/compiled/react-dom")
|
|
2957
2957
|
}
|
|
2958
2958
|
}
|
|
2959
2959
|
};
|
|
@@ -2961,7 +2961,7 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
2961
2961
|
configResolved(config) {
|
|
2962
2962
|
if (isVitestEnv && !config.test?.browser?.enabled) {
|
|
2963
2963
|
config.test.setupFiles = [
|
|
2964
|
-
|
|
2964
|
+
require8.resolve("./mocks/storybook.global.js"),
|
|
2965
2965
|
...config.test?.setupFiles ?? []
|
|
2966
2966
|
];
|
|
2967
2967
|
}
|
package/dist/index.js
CHANGED
|
@@ -31,13 +31,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
31
31
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
32
32
|
var __getProtoOf = Object.getPrototypeOf;
|
|
33
33
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
34
|
-
var
|
|
35
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
36
|
-
}) : x)(function(x) {
|
|
37
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
38
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
39
|
-
});
|
|
40
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
34
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
41
35
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
42
36
|
};
|
|
43
37
|
var __copyProps = (to, from, except, desc) => {
|
|
@@ -2747,13 +2741,14 @@ function vitePluginNextImage(nextConfigResolver) {
|
|
|
2747
2741
|
|
|
2748
2742
|
// src/plugins/next-mocks/compatibility/compatibility-map.ts
|
|
2749
2743
|
var import_semver = __toESM(require_semver2());
|
|
2750
|
-
var
|
|
2744
|
+
var require5 = createRequire(import.meta.url);
|
|
2745
|
+
var getNextjsVersion = () => require5(scopedResolve("next/package.json")).version;
|
|
2751
2746
|
var scopedResolve = (id) => {
|
|
2752
2747
|
let scopedModulePath;
|
|
2753
2748
|
try {
|
|
2754
|
-
scopedModulePath =
|
|
2749
|
+
scopedModulePath = require5.resolve(id, { paths: [resolve()] });
|
|
2755
2750
|
} catch (e) {
|
|
2756
|
-
scopedModulePath =
|
|
2751
|
+
scopedModulePath = require5.resolve(id);
|
|
2757
2752
|
}
|
|
2758
2753
|
const idWithNativePathSep = id.replace(/\//g, sep);
|
|
2759
2754
|
if (scopedModulePath.endsWith(idWithNativePathSep)) {
|
|
@@ -2765,59 +2760,64 @@ var scopedResolve = (id) => {
|
|
|
2765
2760
|
};
|
|
2766
2761
|
|
|
2767
2762
|
// src/plugins/next-mocks/compatibility/compatibility-map.ts
|
|
2768
|
-
var
|
|
2763
|
+
var require6 = createRequire(import.meta.url);
|
|
2764
|
+
var getEntryPoint2 = (subPath, env) => require6.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
|
|
2765
|
+
var mapping = (env) => ({
|
|
2769
2766
|
"<15.0.0": {
|
|
2770
2767
|
"next/dist/server/request/headers": "next/dist/client/components/headers",
|
|
2771
2768
|
// this path only exists from Next 15 onwards
|
|
2772
|
-
"next/dist/server/request/draft-mode":
|
|
2769
|
+
"next/dist/server/request/draft-mode": getEntryPoint2(
|
|
2770
|
+
"draft-mode.compat",
|
|
2771
|
+
env
|
|
2772
|
+
)
|
|
2773
2773
|
}
|
|
2774
|
-
};
|
|
2775
|
-
var getCompatibilityAliases = () => {
|
|
2774
|
+
});
|
|
2775
|
+
var getCompatibilityAliases = (env) => {
|
|
2776
2776
|
const version = getNextjsVersion();
|
|
2777
2777
|
const result = {};
|
|
2778
2778
|
Object.keys(mapping).forEach((key) => {
|
|
2779
2779
|
if (import_semver.default.intersects(version, key)) {
|
|
2780
|
-
Object.assign(result, mapping[key]);
|
|
2780
|
+
Object.assign(result, mapping(env)[key]);
|
|
2781
2781
|
}
|
|
2782
2782
|
});
|
|
2783
2783
|
return result;
|
|
2784
2784
|
};
|
|
2785
2785
|
|
|
2786
2786
|
// src/plugins/next-mocks/plugin.ts
|
|
2787
|
-
var
|
|
2788
|
-
var
|
|
2787
|
+
var require7 = createRequire(import.meta.url);
|
|
2788
|
+
var getEntryPoint3 = (subPath, env) => require7.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
|
|
2789
2789
|
var getAlias2 = (env) => ({
|
|
2790
|
-
"next/headers":
|
|
2791
|
-
"@storybook/nextjs/headers.mock":
|
|
2792
|
-
"@storybook/nextjs-vite/headers.mock":
|
|
2793
|
-
"@storybook/experimental-nextjs-vite/headers.mock":
|
|
2790
|
+
"next/headers": getEntryPoint3("headers", env),
|
|
2791
|
+
"@storybook/nextjs/headers.mock": getEntryPoint3("headers", env),
|
|
2792
|
+
"@storybook/nextjs-vite/headers.mock": getEntryPoint3("headers", env),
|
|
2793
|
+
"@storybook/experimental-nextjs-vite/headers.mock": getEntryPoint3(
|
|
2794
2794
|
"headers",
|
|
2795
2795
|
env
|
|
2796
2796
|
),
|
|
2797
|
-
"next/navigation":
|
|
2798
|
-
"@storybook/nextjs/navigation.mock":
|
|
2799
|
-
"@storybook/nextjs-vite/navigation.mock":
|
|
2800
|
-
"@storybook/experimental-nextjs-vite/navigation.mock":
|
|
2797
|
+
"next/navigation": getEntryPoint3("navigation", env),
|
|
2798
|
+
"@storybook/nextjs/navigation.mock": getEntryPoint3("navigation", env),
|
|
2799
|
+
"@storybook/nextjs-vite/navigation.mock": getEntryPoint3("navigation", env),
|
|
2800
|
+
"@storybook/experimental-nextjs-vite/navigation.mock": getEntryPoint3(
|
|
2801
2801
|
"navigation",
|
|
2802
2802
|
env
|
|
2803
2803
|
),
|
|
2804
|
-
"next/router":
|
|
2805
|
-
"@storybook/nextjs/router.mock":
|
|
2806
|
-
"@storybook/nextjs-vite/router.mock":
|
|
2807
|
-
"@storybook/experimental-nextjs-vite/router.mock":
|
|
2804
|
+
"next/router": getEntryPoint3("router", env),
|
|
2805
|
+
"@storybook/nextjs/router.mock": getEntryPoint3("router", env),
|
|
2806
|
+
"@storybook/nextjs-vite/router.mock": getEntryPoint3("router", env),
|
|
2807
|
+
"@storybook/experimental-nextjs-vite/router.mock": getEntryPoint3(
|
|
2808
2808
|
"router",
|
|
2809
2809
|
env
|
|
2810
2810
|
),
|
|
2811
|
-
"next/cache":
|
|
2812
|
-
"@storybook/nextjs/cache.mock":
|
|
2813
|
-
"@storybook/nextjs-vite/cache.mock":
|
|
2814
|
-
"@storybook/experimental-nextjs-vite/cache.mock":
|
|
2815
|
-
"server-only":
|
|
2816
|
-
"@opentelemetry/api":
|
|
2811
|
+
"next/cache": getEntryPoint3("cache", env),
|
|
2812
|
+
"@storybook/nextjs/cache.mock": getEntryPoint3("cache", env),
|
|
2813
|
+
"@storybook/nextjs-vite/cache.mock": getEntryPoint3("cache", env),
|
|
2814
|
+
"@storybook/experimental-nextjs-vite/cache.mock": getEntryPoint3("cache", env),
|
|
2815
|
+
"server-only": getEntryPoint3("server-only", env),
|
|
2816
|
+
"@opentelemetry/api": require7.resolve(
|
|
2817
2817
|
"next/dist/compiled/@opentelemetry/api"
|
|
2818
2818
|
),
|
|
2819
|
-
"next/dynamic":
|
|
2820
|
-
...getCompatibilityAliases()
|
|
2819
|
+
"next/dynamic": getEntryPoint3("dynamic", env),
|
|
2820
|
+
...getCompatibilityAliases(env)
|
|
2821
2821
|
});
|
|
2822
2822
|
var vitePluginNextMocks = () => ({
|
|
2823
2823
|
name: "vite-plugin-next-mocks",
|
|
@@ -2832,7 +2832,7 @@ var vitePluginNextMocks = () => ({
|
|
|
2832
2832
|
});
|
|
2833
2833
|
|
|
2834
2834
|
// src/index.ts
|
|
2835
|
-
var
|
|
2835
|
+
var require8 = createRequire(import.meta.url);
|
|
2836
2836
|
var loadConfig = (
|
|
2837
2837
|
// biome-ignore lint/suspicious/noExplicitAny: CJS support
|
|
2838
2838
|
nextServerConfig.default || nextServerConfig
|
|
@@ -2854,33 +2854,33 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
2854
2854
|
alias: [
|
|
2855
2855
|
{
|
|
2856
2856
|
find: /^react$/,
|
|
2857
|
-
replacement:
|
|
2857
|
+
replacement: require8.resolve("next/dist/compiled/react")
|
|
2858
2858
|
},
|
|
2859
2859
|
{
|
|
2860
2860
|
find: /^react-dom$/,
|
|
2861
|
-
replacement:
|
|
2861
|
+
replacement: require8.resolve("next/dist/compiled/react-dom")
|
|
2862
2862
|
},
|
|
2863
2863
|
{
|
|
2864
2864
|
find: /^react-dom\/server$/,
|
|
2865
|
-
replacement:
|
|
2865
|
+
replacement: require8.resolve(
|
|
2866
2866
|
"next/dist/compiled/react-dom/server.browser.js"
|
|
2867
2867
|
)
|
|
2868
2868
|
},
|
|
2869
2869
|
{
|
|
2870
2870
|
find: /^react-dom\/test-utils$/,
|
|
2871
|
-
replacement:
|
|
2871
|
+
replacement: require8.resolve(
|
|
2872
2872
|
"next/dist/compiled/react-dom/cjs/react-dom-test-utils.production.js"
|
|
2873
2873
|
)
|
|
2874
2874
|
},
|
|
2875
2875
|
{
|
|
2876
2876
|
find: /^react-dom\/client$/,
|
|
2877
|
-
replacement:
|
|
2877
|
+
replacement: require8.resolve(
|
|
2878
2878
|
"next/dist/compiled/react-dom/client.js"
|
|
2879
2879
|
)
|
|
2880
2880
|
},
|
|
2881
2881
|
{
|
|
2882
2882
|
find: /^react-dom\/cjs\/react-dom\.development\.js$/,
|
|
2883
|
-
replacement:
|
|
2883
|
+
replacement: require8.resolve(
|
|
2884
2884
|
"next/dist/compiled/react-dom/cjs/react-dom.development.js"
|
|
2885
2885
|
)
|
|
2886
2886
|
}
|
|
@@ -2900,26 +2900,26 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
2900
2900
|
},
|
|
2901
2901
|
test: {
|
|
2902
2902
|
alias: {
|
|
2903
|
-
"react/jsx-dev-runtime":
|
|
2903
|
+
"react/jsx-dev-runtime": require8.resolve(
|
|
2904
2904
|
"next/dist/compiled/react/jsx-dev-runtime.js"
|
|
2905
2905
|
),
|
|
2906
|
-
"react/jsx-runtime":
|
|
2906
|
+
"react/jsx-runtime": require8.resolve(
|
|
2907
2907
|
"next/dist/compiled/react/jsx-runtime.js"
|
|
2908
2908
|
),
|
|
2909
|
-
react:
|
|
2910
|
-
"react-dom/server":
|
|
2909
|
+
react: require8.resolve("next/dist/compiled/react"),
|
|
2910
|
+
"react-dom/server": require8.resolve(
|
|
2911
2911
|
executionEnvironment === "node" ? "next/dist/compiled/react-dom/server.js" : "next/dist/compiled/react-dom/server.browser.js"
|
|
2912
2912
|
),
|
|
2913
|
-
"react-dom/test-utils":
|
|
2913
|
+
"react-dom/test-utils": require8.resolve(
|
|
2914
2914
|
"next/dist/compiled/react-dom/cjs/react-dom-test-utils.production.js"
|
|
2915
2915
|
),
|
|
2916
|
-
"react-dom/cjs/react-dom.development.js":
|
|
2916
|
+
"react-dom/cjs/react-dom.development.js": require8.resolve(
|
|
2917
2917
|
"next/dist/compiled/react-dom/cjs/react-dom.development.js"
|
|
2918
2918
|
),
|
|
2919
|
-
"react-dom/client":
|
|
2919
|
+
"react-dom/client": require8.resolve(
|
|
2920
2920
|
"next/dist/compiled/react-dom/client.js"
|
|
2921
2921
|
),
|
|
2922
|
-
"react-dom":
|
|
2922
|
+
"react-dom": require8.resolve("next/dist/compiled/react-dom")
|
|
2923
2923
|
}
|
|
2924
2924
|
}
|
|
2925
2925
|
};
|
|
@@ -2927,7 +2927,7 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
2927
2927
|
configResolved(config) {
|
|
2928
2928
|
if (isVitestEnv && !config.test?.browser?.enabled) {
|
|
2929
2929
|
config.test.setupFiles = [
|
|
2930
|
-
|
|
2930
|
+
require8.resolve("./mocks/storybook.global.js"),
|
|
2931
2931
|
...config.test?.setupFiles ?? []
|
|
2932
2932
|
];
|
|
2933
2933
|
}
|
|
@@ -15,13 +15,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
15
15
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
16
16
|
var __getProtoOf = Object.getPrototypeOf;
|
|
17
17
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
18
|
-
var
|
|
19
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
20
|
-
}) : x)(function(x) {
|
|
21
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
22
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
23
|
-
});
|
|
24
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
18
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
25
19
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
26
20
|
};
|
|
27
21
|
var __copyProps = (to, from, except, desc) => {
|
|
@@ -1897,13 +1891,14 @@ var getAlias = (env) => ({
|
|
|
1897
1891
|
|
|
1898
1892
|
// src/plugins/next-mocks/compatibility/compatibility-map.ts
|
|
1899
1893
|
var import_semver = __toESM(require_semver2());
|
|
1900
|
-
var
|
|
1894
|
+
var require3 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
|
|
1895
|
+
var getNextjsVersion = () => require3(scopedResolve("next/package.json")).version;
|
|
1901
1896
|
var scopedResolve = (id) => {
|
|
1902
1897
|
let scopedModulePath;
|
|
1903
1898
|
try {
|
|
1904
|
-
scopedModulePath =
|
|
1899
|
+
scopedModulePath = require3.resolve(id, { paths: [path.resolve()] });
|
|
1905
1900
|
} catch (e) {
|
|
1906
|
-
scopedModulePath =
|
|
1901
|
+
scopedModulePath = require3.resolve(id);
|
|
1907
1902
|
}
|
|
1908
1903
|
const idWithNativePathSep = id.replace(/\//g, path.sep);
|
|
1909
1904
|
if (scopedModulePath.endsWith(idWithNativePathSep)) {
|
|
@@ -1915,67 +1910,72 @@ var scopedResolve = (id) => {
|
|
|
1915
1910
|
};
|
|
1916
1911
|
|
|
1917
1912
|
// src/plugins/next-mocks/compatibility/compatibility-map.ts
|
|
1918
|
-
var
|
|
1913
|
+
var require4 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
|
|
1914
|
+
var getEntryPoint2 = (subPath, env) => require4.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
|
|
1915
|
+
var mapping = (env) => ({
|
|
1919
1916
|
"<15.0.0": {
|
|
1920
1917
|
"next/dist/server/request/headers": "next/dist/client/components/headers",
|
|
1921
1918
|
// this path only exists from Next 15 onwards
|
|
1922
|
-
"next/dist/server/request/draft-mode":
|
|
1919
|
+
"next/dist/server/request/draft-mode": getEntryPoint2(
|
|
1920
|
+
"draft-mode.compat",
|
|
1921
|
+
env
|
|
1922
|
+
)
|
|
1923
1923
|
}
|
|
1924
|
-
};
|
|
1925
|
-
var getCompatibilityAliases = () => {
|
|
1924
|
+
});
|
|
1925
|
+
var getCompatibilityAliases = (env) => {
|
|
1926
1926
|
const version = getNextjsVersion();
|
|
1927
1927
|
const result = {};
|
|
1928
1928
|
Object.keys(mapping).forEach((key) => {
|
|
1929
1929
|
if (import_semver.default.intersects(version, key)) {
|
|
1930
|
-
Object.assign(result, mapping[key]);
|
|
1930
|
+
Object.assign(result, mapping(env)[key]);
|
|
1931
1931
|
}
|
|
1932
1932
|
});
|
|
1933
1933
|
return result;
|
|
1934
1934
|
};
|
|
1935
1935
|
|
|
1936
1936
|
// src/plugins/next-mocks/plugin.ts
|
|
1937
|
-
var
|
|
1938
|
-
var
|
|
1937
|
+
var require5 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
|
|
1938
|
+
var getEntryPoint3 = (subPath, env) => require5.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
|
|
1939
1939
|
var getAlias2 = (env) => ({
|
|
1940
|
-
"next/headers":
|
|
1941
|
-
"@storybook/nextjs/headers.mock":
|
|
1942
|
-
"@storybook/nextjs-vite/headers.mock":
|
|
1943
|
-
"@storybook/experimental-nextjs-vite/headers.mock":
|
|
1940
|
+
"next/headers": getEntryPoint3("headers", env),
|
|
1941
|
+
"@storybook/nextjs/headers.mock": getEntryPoint3("headers", env),
|
|
1942
|
+
"@storybook/nextjs-vite/headers.mock": getEntryPoint3("headers", env),
|
|
1943
|
+
"@storybook/experimental-nextjs-vite/headers.mock": getEntryPoint3(
|
|
1944
1944
|
"headers",
|
|
1945
1945
|
env
|
|
1946
1946
|
),
|
|
1947
|
-
"next/navigation":
|
|
1948
|
-
"@storybook/nextjs/navigation.mock":
|
|
1949
|
-
"@storybook/nextjs-vite/navigation.mock":
|
|
1950
|
-
"@storybook/experimental-nextjs-vite/navigation.mock":
|
|
1947
|
+
"next/navigation": getEntryPoint3("navigation", env),
|
|
1948
|
+
"@storybook/nextjs/navigation.mock": getEntryPoint3("navigation", env),
|
|
1949
|
+
"@storybook/nextjs-vite/navigation.mock": getEntryPoint3("navigation", env),
|
|
1950
|
+
"@storybook/experimental-nextjs-vite/navigation.mock": getEntryPoint3(
|
|
1951
1951
|
"navigation",
|
|
1952
1952
|
env
|
|
1953
1953
|
),
|
|
1954
|
-
"next/router":
|
|
1955
|
-
"@storybook/nextjs/router.mock":
|
|
1956
|
-
"@storybook/nextjs-vite/router.mock":
|
|
1957
|
-
"@storybook/experimental-nextjs-vite/router.mock":
|
|
1954
|
+
"next/router": getEntryPoint3("router", env),
|
|
1955
|
+
"@storybook/nextjs/router.mock": getEntryPoint3("router", env),
|
|
1956
|
+
"@storybook/nextjs-vite/router.mock": getEntryPoint3("router", env),
|
|
1957
|
+
"@storybook/experimental-nextjs-vite/router.mock": getEntryPoint3(
|
|
1958
1958
|
"router",
|
|
1959
1959
|
env
|
|
1960
1960
|
),
|
|
1961
|
-
"next/cache":
|
|
1962
|
-
"@storybook/nextjs/cache.mock":
|
|
1963
|
-
"@storybook/nextjs-vite/cache.mock":
|
|
1964
|
-
"@storybook/experimental-nextjs-vite/cache.mock":
|
|
1965
|
-
"server-only":
|
|
1966
|
-
"@opentelemetry/api":
|
|
1961
|
+
"next/cache": getEntryPoint3("cache", env),
|
|
1962
|
+
"@storybook/nextjs/cache.mock": getEntryPoint3("cache", env),
|
|
1963
|
+
"@storybook/nextjs-vite/cache.mock": getEntryPoint3("cache", env),
|
|
1964
|
+
"@storybook/experimental-nextjs-vite/cache.mock": getEntryPoint3("cache", env),
|
|
1965
|
+
"server-only": getEntryPoint3("server-only", env),
|
|
1966
|
+
"@opentelemetry/api": require5.resolve(
|
|
1967
1967
|
"next/dist/compiled/@opentelemetry/api"
|
|
1968
1968
|
),
|
|
1969
|
-
"next/dynamic":
|
|
1970
|
-
...getCompatibilityAliases()
|
|
1969
|
+
"next/dynamic": getEntryPoint3("dynamic", env),
|
|
1970
|
+
...getCompatibilityAliases(env)
|
|
1971
1971
|
});
|
|
1972
1972
|
|
|
1973
1973
|
// src/mocks/storybook.global.ts
|
|
1974
|
-
var
|
|
1974
|
+
var require6 = module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.src || new URL('out.js', document.baseURI).href)));
|
|
1975
1975
|
moduleAlias__default.default.addAliases({
|
|
1976
1976
|
react: "next/dist/compiled/react",
|
|
1977
1977
|
"react-dom/server": "next/dist/compiled/react-dom/server.js",
|
|
1978
|
-
"react-dom/test-utils":
|
|
1978
|
+
"react-dom/test-utils": require6.resolve(
|
|
1979
1979
|
"next/dist/compiled/react-dom/cjs/react-dom-test-utils.production.js"
|
|
1980
1980
|
),
|
|
1981
1981
|
"react-dom": "next/dist/compiled/react-dom",
|
|
@@ -8,13 +8,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
8
8
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
9
9
|
var __getProtoOf = Object.getPrototypeOf;
|
|
10
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
-
var
|
|
12
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
13
|
-
}) : x)(function(x) {
|
|
14
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
15
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
16
|
-
});
|
|
17
|
-
var __commonJS = (cb, mod) => function __require2() {
|
|
11
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
18
12
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
19
13
|
};
|
|
20
14
|
var __copyProps = (to, from, except, desc) => {
|
|
@@ -1890,13 +1884,14 @@ var getAlias = (env) => ({
|
|
|
1890
1884
|
|
|
1891
1885
|
// src/plugins/next-mocks/compatibility/compatibility-map.ts
|
|
1892
1886
|
var import_semver = __toESM(require_semver2());
|
|
1893
|
-
var
|
|
1887
|
+
var require3 = createRequire(import.meta.url);
|
|
1888
|
+
var getNextjsVersion = () => require3(scopedResolve("next/package.json")).version;
|
|
1894
1889
|
var scopedResolve = (id) => {
|
|
1895
1890
|
let scopedModulePath;
|
|
1896
1891
|
try {
|
|
1897
|
-
scopedModulePath =
|
|
1892
|
+
scopedModulePath = require3.resolve(id, { paths: [resolve()] });
|
|
1898
1893
|
} catch (e) {
|
|
1899
|
-
scopedModulePath =
|
|
1894
|
+
scopedModulePath = require3.resolve(id);
|
|
1900
1895
|
}
|
|
1901
1896
|
const idWithNativePathSep = id.replace(/\//g, sep);
|
|
1902
1897
|
if (scopedModulePath.endsWith(idWithNativePathSep)) {
|
|
@@ -1908,67 +1903,72 @@ var scopedResolve = (id) => {
|
|
|
1908
1903
|
};
|
|
1909
1904
|
|
|
1910
1905
|
// src/plugins/next-mocks/compatibility/compatibility-map.ts
|
|
1911
|
-
var
|
|
1906
|
+
var require4 = createRequire(import.meta.url);
|
|
1907
|
+
var getEntryPoint2 = (subPath, env) => require4.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
|
|
1908
|
+
var mapping = (env) => ({
|
|
1912
1909
|
"<15.0.0": {
|
|
1913
1910
|
"next/dist/server/request/headers": "next/dist/client/components/headers",
|
|
1914
1911
|
// this path only exists from Next 15 onwards
|
|
1915
|
-
"next/dist/server/request/draft-mode":
|
|
1912
|
+
"next/dist/server/request/draft-mode": getEntryPoint2(
|
|
1913
|
+
"draft-mode.compat",
|
|
1914
|
+
env
|
|
1915
|
+
)
|
|
1916
1916
|
}
|
|
1917
|
-
};
|
|
1918
|
-
var getCompatibilityAliases = () => {
|
|
1917
|
+
});
|
|
1918
|
+
var getCompatibilityAliases = (env) => {
|
|
1919
1919
|
const version = getNextjsVersion();
|
|
1920
1920
|
const result = {};
|
|
1921
1921
|
Object.keys(mapping).forEach((key) => {
|
|
1922
1922
|
if (import_semver.default.intersects(version, key)) {
|
|
1923
|
-
Object.assign(result, mapping[key]);
|
|
1923
|
+
Object.assign(result, mapping(env)[key]);
|
|
1924
1924
|
}
|
|
1925
1925
|
});
|
|
1926
1926
|
return result;
|
|
1927
1927
|
};
|
|
1928
1928
|
|
|
1929
1929
|
// src/plugins/next-mocks/plugin.ts
|
|
1930
|
-
var
|
|
1931
|
-
var
|
|
1930
|
+
var require5 = createRequire(import.meta.url);
|
|
1931
|
+
var getEntryPoint3 = (subPath, env) => require5.resolve(`${VITEST_PLUGIN_NAME}/${env}/mocks/${subPath}`);
|
|
1932
1932
|
var getAlias2 = (env) => ({
|
|
1933
|
-
"next/headers":
|
|
1934
|
-
"@storybook/nextjs/headers.mock":
|
|
1935
|
-
"@storybook/nextjs-vite/headers.mock":
|
|
1936
|
-
"@storybook/experimental-nextjs-vite/headers.mock":
|
|
1933
|
+
"next/headers": getEntryPoint3("headers", env),
|
|
1934
|
+
"@storybook/nextjs/headers.mock": getEntryPoint3("headers", env),
|
|
1935
|
+
"@storybook/nextjs-vite/headers.mock": getEntryPoint3("headers", env),
|
|
1936
|
+
"@storybook/experimental-nextjs-vite/headers.mock": getEntryPoint3(
|
|
1937
1937
|
"headers",
|
|
1938
1938
|
env
|
|
1939
1939
|
),
|
|
1940
|
-
"next/navigation":
|
|
1941
|
-
"@storybook/nextjs/navigation.mock":
|
|
1942
|
-
"@storybook/nextjs-vite/navigation.mock":
|
|
1943
|
-
"@storybook/experimental-nextjs-vite/navigation.mock":
|
|
1940
|
+
"next/navigation": getEntryPoint3("navigation", env),
|
|
1941
|
+
"@storybook/nextjs/navigation.mock": getEntryPoint3("navigation", env),
|
|
1942
|
+
"@storybook/nextjs-vite/navigation.mock": getEntryPoint3("navigation", env),
|
|
1943
|
+
"@storybook/experimental-nextjs-vite/navigation.mock": getEntryPoint3(
|
|
1944
1944
|
"navigation",
|
|
1945
1945
|
env
|
|
1946
1946
|
),
|
|
1947
|
-
"next/router":
|
|
1948
|
-
"@storybook/nextjs/router.mock":
|
|
1949
|
-
"@storybook/nextjs-vite/router.mock":
|
|
1950
|
-
"@storybook/experimental-nextjs-vite/router.mock":
|
|
1947
|
+
"next/router": getEntryPoint3("router", env),
|
|
1948
|
+
"@storybook/nextjs/router.mock": getEntryPoint3("router", env),
|
|
1949
|
+
"@storybook/nextjs-vite/router.mock": getEntryPoint3("router", env),
|
|
1950
|
+
"@storybook/experimental-nextjs-vite/router.mock": getEntryPoint3(
|
|
1951
1951
|
"router",
|
|
1952
1952
|
env
|
|
1953
1953
|
),
|
|
1954
|
-
"next/cache":
|
|
1955
|
-
"@storybook/nextjs/cache.mock":
|
|
1956
|
-
"@storybook/nextjs-vite/cache.mock":
|
|
1957
|
-
"@storybook/experimental-nextjs-vite/cache.mock":
|
|
1958
|
-
"server-only":
|
|
1959
|
-
"@opentelemetry/api":
|
|
1954
|
+
"next/cache": getEntryPoint3("cache", env),
|
|
1955
|
+
"@storybook/nextjs/cache.mock": getEntryPoint3("cache", env),
|
|
1956
|
+
"@storybook/nextjs-vite/cache.mock": getEntryPoint3("cache", env),
|
|
1957
|
+
"@storybook/experimental-nextjs-vite/cache.mock": getEntryPoint3("cache", env),
|
|
1958
|
+
"server-only": getEntryPoint3("server-only", env),
|
|
1959
|
+
"@opentelemetry/api": require5.resolve(
|
|
1960
1960
|
"next/dist/compiled/@opentelemetry/api"
|
|
1961
1961
|
),
|
|
1962
|
-
"next/dynamic":
|
|
1963
|
-
...getCompatibilityAliases()
|
|
1962
|
+
"next/dynamic": getEntryPoint3("dynamic", env),
|
|
1963
|
+
...getCompatibilityAliases(env)
|
|
1964
1964
|
});
|
|
1965
1965
|
|
|
1966
1966
|
// src/mocks/storybook.global.ts
|
|
1967
|
-
var
|
|
1967
|
+
var require6 = createRequire(import.meta.url);
|
|
1968
1968
|
moduleAlias.addAliases({
|
|
1969
1969
|
react: "next/dist/compiled/react",
|
|
1970
1970
|
"react-dom/server": "next/dist/compiled/react-dom/server.js",
|
|
1971
|
-
"react-dom/test-utils":
|
|
1971
|
+
"react-dom/test-utils": require6.resolve(
|
|
1972
1972
|
"next/dist/compiled/react-dom/cjs/react-dom-test-utils.production.js"
|
|
1973
1973
|
),
|
|
1974
1974
|
"react-dom": "next/dist/compiled/react-dom",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-storybook-nextjs",
|
|
3
|
-
"version": "1.1.0--canary.27.
|
|
3
|
+
"version": "1.1.0--canary.27.ea73e5f.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite-plugin",
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"./browser/mocks/legacy-image": "./dist/plugins/next-image/alias/next-legacy-image.js",
|
|
40
40
|
"./browser/mocks/image-default-loader": "./dist/plugins/next-image/alias/image-default-loader.js",
|
|
41
41
|
"./browser/mocks/image-context": "./dist/plugins/next-image/alias/image-context.js",
|
|
42
|
+
"./browser/mocks/draft-mode": "./dist/plugins/next-mocks/compatibility/draft-mode.compat.js",
|
|
42
43
|
"./node/mocks/cache": "./dist/plugins/next-mocks/alias/cache/index.cjs",
|
|
43
44
|
"./node/mocks/navigation": "./dist/plugins/next-mocks/alias/navigation/index.cjs",
|
|
44
45
|
"./node/mocks/headers": "./dist/plugins/next-mocks/alias/headers/index.cjs",
|
|
@@ -48,7 +49,8 @@
|
|
|
48
49
|
"./node/mocks/image": "./dist/plugins/next-image/alias/next-image.cjs",
|
|
49
50
|
"./node/mocks/legacy-image": "./dist/plugins/next-image/alias/next-legacy-image.cjs",
|
|
50
51
|
"./node/mocks/image-default-loader": "./dist/plugins/next-image/alias/image-default-loader.cjs",
|
|
51
|
-
"./node/mocks/image-context": "./dist/plugins/next-image/alias/image-context.cjs"
|
|
52
|
+
"./node/mocks/image-context": "./dist/plugins/next-image/alias/image-context.cjs",
|
|
53
|
+
"./node/mocks/draft-mode": "./dist/plugins/next-mocks/compatibility/draft-mode.compat.cjs"
|
|
52
54
|
},
|
|
53
55
|
"scripts": {
|
|
54
56
|
"prepublishOnly": "pnpm build",
|