@storybook/nextjs 10.1.0-alpha.8 → 10.1.0-beta.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/_browser-chunks/{chunk-KX5HHFXV.js → chunk-2SBZPHE7.js} +50 -100
- package/dist/_browser-chunks/chunk-RDMFII4N.js +22 -0
- package/dist/_browser-chunks/{chunk-L5NVL7MD.js → chunk-SL3VIQZ3.js} +7 -13
- package/dist/_browser-chunks/react-18-PYSEDAWB.js +43 -0
- package/dist/_node-chunks/chunk-AU547LNK.js +76 -0
- package/dist/_node-chunks/chunk-EONFLREF.js +57 -0
- package/dist/_node-chunks/chunk-NVHRUSN5.js +211 -0
- package/dist/_node-chunks/configureNextFont-3RPVM2N7.js +28 -0
- package/dist/_node-chunks/{loader-SKCOTR5I.js → loader-PBLFQE7I.js} +15 -25
- package/dist/_node-chunks/{loader-PTNYR6I7.js → loader-UX42M74F.js} +11 -16
- package/dist/_node-chunks/{utils-ONLCV4PV.js → utils-MPWEOWV4.js} +8 -9
- package/dist/_node-chunks/webpack-5IZRQF33.js +23 -0
- package/dist/_node-chunks/{webpack-QAHMKC4Y.js → webpack-C4DEBGCG.js} +13 -19
- package/dist/_node-chunks/webpack-EFCFZKO7.js +97 -0
- package/dist/_node-chunks/{webpack-3MPPBO7O.js → webpack-KW7MEY7C.js} +9 -12
- package/dist/_node-chunks/webpack-TVYIGXMK.js +24 -0
- package/dist/_node-chunks/webpack-UAKFJEYJ.js +30 -0
- package/dist/_node-chunks/webpack-WL4FYVO5.js +23 -0
- package/dist/_node-chunks/webpack-WZC6ZANM.js +60 -0
- package/dist/compatibility/draft-mode.compat.js +1 -1
- package/dist/export-mocks/cache/index.js +3 -6
- package/dist/export-mocks/headers/index.js +6 -29
- package/dist/export-mocks/index.js +9 -10
- package/dist/export-mocks/navigation/index.js +17 -41
- package/dist/export-mocks/router/index.d.ts +4 -7
- package/dist/export-mocks/router/index.js +20 -54
- package/dist/font/webpack/loader/storybook-nextjs-font-loader.js +38 -80
- package/dist/image-context.js +1 -1
- package/dist/images/next-image.js +5 -11
- package/dist/images/next-legacy-image.js +3 -6
- package/dist/index.js +2865 -8413
- package/dist/next-image-loader-stub.js +9 -16
- package/dist/node/index.js +6 -10
- package/dist/preset.js +183 -462
- package/dist/preview.js +2 -2
- package/dist/rsc/server-only.js +1 -1
- package/dist/swc/next-swc-loader-patch.js +46 -84
- package/package.json +6 -6
- package/dist/_browser-chunks/chunk-I5RFHXDS.js +0 -40
- package/dist/_browser-chunks/react-18-G7Q4PNHD.js +0 -71
- package/dist/_node-chunks/chunk-6MGNTEEA.js +0 -475
- package/dist/_node-chunks/chunk-LARGD3DA.js +0 -74
- package/dist/_node-chunks/chunk-TZWXYEHU.js +0 -102
- package/dist/_node-chunks/chunk-YE4AS3Q5.js +0 -17
- package/dist/_node-chunks/configureNextFont-5VGP6R4M.js +0 -36
- package/dist/_node-chunks/webpack-EXHZOTZ7.js +0 -30
- package/dist/_node-chunks/webpack-PBFKV6UK.js +0 -27
- package/dist/_node-chunks/webpack-R54SMZ7U.js +0 -26
- package/dist/_node-chunks/webpack-SFOC3ZEG.js +0 -77
- package/dist/_node-chunks/webpack-SPGYDJQ3.js +0 -107
- package/dist/_node-chunks/webpack-TDMUT5LM.js +0 -38
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// ../../core/src/shared/utils/module.ts
|
|
14
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
15
|
+
|
|
16
|
+
// ../../node_modules/exsolve/dist/index.mjs
|
|
17
|
+
import assert from "node:assert";
|
|
18
|
+
import v8 from "node:v8";
|
|
19
|
+
import { format, inspect } from "node:util";
|
|
20
|
+
var own$1 = {}.hasOwnProperty, classRegExp = /^([A-Z][a-z\d]*)+$/, kTypes = /* @__PURE__ */ new Set([
|
|
21
|
+
"string",
|
|
22
|
+
"function",
|
|
23
|
+
"number",
|
|
24
|
+
"object",
|
|
25
|
+
"Function",
|
|
26
|
+
"Object",
|
|
27
|
+
"boolean",
|
|
28
|
+
"bigint",
|
|
29
|
+
"symbol"
|
|
30
|
+
]), messages = /* @__PURE__ */ new Map(), nodeInternalPrefix = "__node_internal_", userStackTraceLimit;
|
|
31
|
+
function formatList(array, type = "and") {
|
|
32
|
+
return array.length < 3 ? array.join(` ${type} `) : `${array.slice(0, -1).join(", ")}, ${type} ${array.at(-1)}`;
|
|
33
|
+
}
|
|
34
|
+
function createError(sym, value, constructor) {
|
|
35
|
+
return messages.set(sym, value), makeNodeErrorWithCode(constructor, sym);
|
|
36
|
+
}
|
|
37
|
+
function makeNodeErrorWithCode(Base, key) {
|
|
38
|
+
return function(...parameters) {
|
|
39
|
+
let limit = Error.stackTraceLimit;
|
|
40
|
+
isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = 0);
|
|
41
|
+
let error = new Base();
|
|
42
|
+
isErrorStackTraceLimitWritable() && (Error.stackTraceLimit = limit);
|
|
43
|
+
let message = getMessage(key, parameters, error);
|
|
44
|
+
return Object.defineProperties(error, {
|
|
45
|
+
message: {
|
|
46
|
+
value: message,
|
|
47
|
+
enumerable: !1,
|
|
48
|
+
writable: !0,
|
|
49
|
+
configurable: !0
|
|
50
|
+
},
|
|
51
|
+
toString: {
|
|
52
|
+
value() {
|
|
53
|
+
return `${this.name} [${key}]: ${this.message}`;
|
|
54
|
+
},
|
|
55
|
+
enumerable: !1,
|
|
56
|
+
writable: !0,
|
|
57
|
+
configurable: !0
|
|
58
|
+
}
|
|
59
|
+
}), captureLargerStackTrace(error), error.code = key, error;
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
function isErrorStackTraceLimitWritable() {
|
|
63
|
+
try {
|
|
64
|
+
if (v8.startupSnapshot.isBuildingSnapshot()) return !1;
|
|
65
|
+
} catch {
|
|
66
|
+
}
|
|
67
|
+
let desc = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
68
|
+
return desc === void 0 ? Object.isExtensible(Error) : own$1.call(desc, "writable") && desc.writable !== void 0 ? desc.writable : desc.set !== void 0;
|
|
69
|
+
}
|
|
70
|
+
function hideStackFrames(wrappedFunction) {
|
|
71
|
+
let hidden = nodeInternalPrefix + wrappedFunction.name;
|
|
72
|
+
return Object.defineProperty(wrappedFunction, "name", { value: hidden }), wrappedFunction;
|
|
73
|
+
}
|
|
74
|
+
var captureLargerStackTrace = hideStackFrames(function(error) {
|
|
75
|
+
let stackTraceLimitIsWritable = isErrorStackTraceLimitWritable();
|
|
76
|
+
return stackTraceLimitIsWritable && (userStackTraceLimit = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(error), stackTraceLimitIsWritable && (Error.stackTraceLimit = userStackTraceLimit), error;
|
|
77
|
+
});
|
|
78
|
+
function getMessage(key, parameters, self) {
|
|
79
|
+
let message = messages.get(key);
|
|
80
|
+
if (assert.ok(message !== void 0, "expected `message` to be found"), typeof message == "function")
|
|
81
|
+
return assert.ok(message.length <= parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${message.length}).`), Reflect.apply(message, self, parameters);
|
|
82
|
+
let regex = /%[dfijoOs]/g, expectedLength = 0;
|
|
83
|
+
for (; regex.exec(message) !== null; ) expectedLength++;
|
|
84
|
+
return assert.ok(expectedLength === parameters.length, `Code: ${key}; The provided arguments length (${parameters.length}) does not match the required ones (${expectedLength}).`), parameters.length === 0 ? message : (parameters.unshift(message), Reflect.apply(format, null, parameters));
|
|
85
|
+
}
|
|
86
|
+
function determineSpecificType(value) {
|
|
87
|
+
if (value == null) return String(value);
|
|
88
|
+
if (typeof value == "function" && value.name) return `function ${value.name}`;
|
|
89
|
+
if (typeof value == "object")
|
|
90
|
+
return value.constructor && value.constructor.name ? `an instance of ${value.constructor.name}` : `${inspect(value, { depth: -1 })}`;
|
|
91
|
+
let inspected = inspect(value, { colors: !1 });
|
|
92
|
+
return inspected.length > 28 && (inspected = `${inspected.slice(0, 25)}...`), `type ${typeof value} (${inspected})`;
|
|
93
|
+
}
|
|
94
|
+
var ERR_INVALID_ARG_TYPE = createError("ERR_INVALID_ARG_TYPE", (name, expected, actual) => {
|
|
95
|
+
assert.ok(typeof name == "string", "'name' must be a string"), Array.isArray(expected) || (expected = [expected]);
|
|
96
|
+
let message = "The ";
|
|
97
|
+
if (name.endsWith(" argument")) message += `${name} `;
|
|
98
|
+
else {
|
|
99
|
+
let type = name.includes(".") ? "property" : "argument";
|
|
100
|
+
message += `"${name}" ${type} `;
|
|
101
|
+
}
|
|
102
|
+
message += "must be ";
|
|
103
|
+
let types = [], instances = [], other = [];
|
|
104
|
+
for (let value of expected)
|
|
105
|
+
assert.ok(typeof value == "string", "All expected entries have to be of type string"), kTypes.has(value) ? types.push(value.toLowerCase()) : classRegExp.exec(value) === null ? (assert.ok(value !== "object", 'The value "object" should be written as "Object"'), other.push(value)) : instances.push(value);
|
|
106
|
+
if (instances.length > 0) {
|
|
107
|
+
let pos = types.indexOf("object");
|
|
108
|
+
pos !== -1 && (types.slice(pos, 1), instances.push("Object"));
|
|
109
|
+
}
|
|
110
|
+
return types.length > 0 && (message += `${types.length > 1 ? "one of type" : "of type"} ${formatList(types, "or")}`, (instances.length > 0 || other.length > 0) && (message += " or ")), instances.length > 0 && (message += `an instance of ${formatList(instances, "or")}`, other.length > 0 && (message += " or ")), other.length > 0 && (other.length > 1 ? message += `one of ${formatList(other, "or")}` : (other[0]?.toLowerCase() !== other[0] && (message += "an "), message += `${other[0]}`)), message += `. Received ${determineSpecificType(actual)}`, message;
|
|
111
|
+
}, TypeError), ERR_INVALID_MODULE_SPECIFIER = createError(
|
|
112
|
+
"ERR_INVALID_MODULE_SPECIFIER",
|
|
113
|
+
/**
|
|
114
|
+
* @param {string} request
|
|
115
|
+
* @param {string} reason
|
|
116
|
+
* @param {string} [base]
|
|
117
|
+
*/
|
|
118
|
+
(request, reason, base) => `Invalid module "${request}" ${reason}${base ? ` imported from ${base}` : ""}`,
|
|
119
|
+
TypeError
|
|
120
|
+
), ERR_INVALID_PACKAGE_CONFIG = createError("ERR_INVALID_PACKAGE_CONFIG", (path$1, base, message) => `Invalid package config ${path$1}${base ? ` while importing ${base}` : ""}${message ? `. ${message}` : ""}`, Error), ERR_INVALID_PACKAGE_TARGET = createError("ERR_INVALID_PACKAGE_TARGET", (packagePath, key, target, isImport = !1, base) => {
|
|
121
|
+
let relatedError = typeof target == "string" && !isImport && target.length > 0 && !target.startsWith("./");
|
|
122
|
+
return key === "." ? (assert.ok(isImport === !1), `Invalid "exports" main target ${JSON.stringify(target)} defined in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`) : `Invalid "${isImport ? "imports" : "exports"}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${packagePath}package.json${base ? ` imported from ${base}` : ""}${relatedError ? '; targets must start with "./"' : ""}`;
|
|
123
|
+
}, Error), ERR_MODULE_NOT_FOUND = createError("ERR_MODULE_NOT_FOUND", (path$1, base, exactUrl = !1) => `Cannot find ${exactUrl ? "module" : "package"} '${path$1}' imported from ${base}`, Error), ERR_NETWORK_IMPORT_DISALLOWED = createError("ERR_NETWORK_IMPORT_DISALLOWED", "import of '%s' by %s is not supported: %s", Error), ERR_PACKAGE_IMPORT_NOT_DEFINED = createError("ERR_PACKAGE_IMPORT_NOT_DEFINED", (specifier, packagePath, base) => `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath || ""}package.json` : ""} imported from ${base}`, TypeError), ERR_PACKAGE_PATH_NOT_EXPORTED = createError(
|
|
124
|
+
"ERR_PACKAGE_PATH_NOT_EXPORTED",
|
|
125
|
+
/**
|
|
126
|
+
* @param {string} packagePath
|
|
127
|
+
* @param {string} subpath
|
|
128
|
+
* @param {string} [base]
|
|
129
|
+
*/
|
|
130
|
+
(packagePath, subpath, base) => subpath === "." ? `No "exports" main defined in ${packagePath}package.json${base ? ` imported from ${base}` : ""}` : `Package subpath '${subpath}' is not defined by "exports" in ${packagePath}package.json${base ? ` imported from ${base}` : ""}`,
|
|
131
|
+
Error
|
|
132
|
+
), ERR_UNSUPPORTED_DIR_IMPORT = createError("ERR_UNSUPPORTED_DIR_IMPORT", "Directory import '%s' is not supported resolving ES modules imported from %s", Error), ERR_UNSUPPORTED_RESOLVE_REQUEST = createError("ERR_UNSUPPORTED_RESOLVE_REQUEST", 'Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.', TypeError), ERR_UNKNOWN_FILE_EXTENSION = createError("ERR_UNKNOWN_FILE_EXTENSION", (extension, path$1) => `Unknown file extension "${extension}" for ${path$1}`, TypeError), ERR_INVALID_ARG_VALUE = createError("ERR_INVALID_ARG_VALUE", (name, value, reason = "is invalid") => {
|
|
133
|
+
let inspected = inspect(value);
|
|
134
|
+
return inspected.length > 128 && (inspected = `${inspected.slice(0, 128)}...`), `The ${name.includes(".") ? "property" : "argument"} '${name}' ${reason}. Received ${inspected}`;
|
|
135
|
+
}, TypeError), hasOwnProperty$1 = {}.hasOwnProperty;
|
|
136
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
137
|
+
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace], own = {}.hasOwnProperty;
|
|
138
|
+
var isWindows = process.platform === "win32", globalCache = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
|
|
139
|
+
|
|
140
|
+
// ../../node_modules/pathe/dist/shared/pathe.ff20891b.mjs
|
|
141
|
+
var _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
|
|
142
|
+
function normalizeWindowsPath(input = "") {
|
|
143
|
+
return input && input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
|
|
144
|
+
}
|
|
145
|
+
var _UNC_REGEX = /^[/\\]{2}/, _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/, _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
|
|
146
|
+
var normalize = function(path2) {
|
|
147
|
+
if (path2.length === 0)
|
|
148
|
+
return ".";
|
|
149
|
+
path2 = normalizeWindowsPath(path2);
|
|
150
|
+
let isUNCPath = path2.match(_UNC_REGEX), isPathAbsolute = isAbsolute(path2), trailingSeparator = path2[path2.length - 1] === "/";
|
|
151
|
+
return path2 = normalizeString(path2, !isPathAbsolute), path2.length === 0 ? isPathAbsolute ? "/" : trailingSeparator ? "./" : "." : (trailingSeparator && (path2 += "/"), _DRIVE_LETTER_RE.test(path2) && (path2 += "/"), isUNCPath ? isPathAbsolute ? `//${path2}` : `//./${path2}` : isPathAbsolute && !isAbsolute(path2) ? `/${path2}` : path2);
|
|
152
|
+
}, join = function(...arguments_) {
|
|
153
|
+
if (arguments_.length === 0)
|
|
154
|
+
return ".";
|
|
155
|
+
let joined;
|
|
156
|
+
for (let argument of arguments_)
|
|
157
|
+
argument && argument.length > 0 && (joined === void 0 ? joined = argument : joined += `/${argument}`);
|
|
158
|
+
return joined === void 0 ? "." : normalize(joined.replace(/\/\/+/g, "/"));
|
|
159
|
+
};
|
|
160
|
+
function normalizeString(path2, allowAboveRoot) {
|
|
161
|
+
let res = "", lastSegmentLength = 0, lastSlash = -1, dots = 0, char = null;
|
|
162
|
+
for (let index = 0; index <= path2.length; ++index) {
|
|
163
|
+
if (index < path2.length)
|
|
164
|
+
char = path2[index];
|
|
165
|
+
else {
|
|
166
|
+
if (char === "/")
|
|
167
|
+
break;
|
|
168
|
+
char = "/";
|
|
169
|
+
}
|
|
170
|
+
if (char === "/") {
|
|
171
|
+
if (!(lastSlash === index - 1 || dots === 1)) if (dots === 2) {
|
|
172
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
173
|
+
if (res.length > 2) {
|
|
174
|
+
let lastSlashIndex = res.lastIndexOf("/");
|
|
175
|
+
lastSlashIndex === -1 ? (res = "", lastSegmentLength = 0) : (res = res.slice(0, lastSlashIndex), lastSegmentLength = res.length - 1 - res.lastIndexOf("/")), lastSlash = index, dots = 0;
|
|
176
|
+
continue;
|
|
177
|
+
} else if (res.length > 0) {
|
|
178
|
+
res = "", lastSegmentLength = 0, lastSlash = index, dots = 0;
|
|
179
|
+
continue;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
allowAboveRoot && (res += res.length > 0 ? "/.." : "..", lastSegmentLength = 2);
|
|
183
|
+
} else
|
|
184
|
+
res.length > 0 ? res += `/${path2.slice(lastSlash + 1, index)}` : res = path2.slice(lastSlash + 1, index), lastSegmentLength = index - lastSlash - 1;
|
|
185
|
+
lastSlash = index, dots = 0;
|
|
186
|
+
} else char === "." && dots !== -1 ? ++dots : dots = -1;
|
|
187
|
+
}
|
|
188
|
+
return res;
|
|
189
|
+
}
|
|
190
|
+
var isAbsolute = function(p) {
|
|
191
|
+
return _IS_ABSOLUTE_RE.test(p);
|
|
192
|
+
};
|
|
193
|
+
var dirname = function(p) {
|
|
194
|
+
let segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
|
|
195
|
+
return segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0]) && (segments[0] += "/"), segments.join("/") || (isAbsolute(p) ? "/" : ".");
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
// ../../core/src/shared/utils/module.ts
|
|
199
|
+
var importMetaResolve = (...args) => typeof import.meta.resolve != "function" && process.env.VITEST === "true" ? (console.warn(
|
|
200
|
+
"importMetaResolve from within Storybook is being used in a Vitest test, but it shouldn't be. Please report this at https://github.com/storybookjs/storybook/issues/new?template=bug_report.yml"
|
|
201
|
+
), pathToFileURL(args[0]).href) : import.meta.resolve(...args), resolvePackageDir = (pkg, parent) => {
|
|
202
|
+
try {
|
|
203
|
+
return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"), parent)));
|
|
204
|
+
} catch {
|
|
205
|
+
return dirname(fileURLToPath(importMetaResolve(join(pkg, "package.json"))));
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
export {
|
|
210
|
+
resolvePackageDir
|
|
211
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// src/font/webpack/configureNextFont.ts
|
|
14
|
+
function configureNextFont(baseConfig, isSWC) {
|
|
15
|
+
isSWC ? baseConfig.module?.rules?.push({
|
|
16
|
+
test: /next(\\|\/|\\\\).*(\\|\/|\\\\)target\.css$/,
|
|
17
|
+
loader: "@storybook/nextjs/storybook-nextjs-font-loader"
|
|
18
|
+
}) : baseConfig.resolveLoader = {
|
|
19
|
+
...baseConfig.resolveLoader,
|
|
20
|
+
alias: {
|
|
21
|
+
...baseConfig.resolveLoader?.alias,
|
|
22
|
+
"storybook-nextjs-font-loader": "@storybook/nextjs/storybook-nextjs-font-loader"
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
configureNextFont
|
|
28
|
+
};
|
|
@@ -1,21 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
getNodeModulesExcludeRegex
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
__name
|
|
18
|
-
} from "./chunk-YE4AS3Q5.js";
|
|
14
|
+
} from "./chunk-AU547LNK.js";
|
|
15
|
+
import "./chunk-NVHRUSN5.js";
|
|
19
16
|
|
|
20
17
|
// src/swc/loader.ts
|
|
21
18
|
import { join } from "node:path";
|
|
@@ -23,19 +20,12 @@ import { getProjectRoot } from "storybook/internal/common";
|
|
|
23
20
|
import { getVirtualModules } from "@storybook/builder-webpack5";
|
|
24
21
|
import nextJSLoadConfigModule from "next/dist/build/load-jsconfig.js";
|
|
25
22
|
import { getSupportedBrowsers } from "next/dist/build/utils.js";
|
|
26
|
-
var configureSWCLoader =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const projectRoot = getProjectRoot();
|
|
30
|
-
const loadJsConfig = nextJSLoadConfigModule.default ?? nextJSLoadConfigModule;
|
|
31
|
-
const { jsConfig } = await loadJsConfig(projectRoot, nextConfig);
|
|
32
|
-
const rawRule = baseConfig.module?.rules?.find(
|
|
33
|
-
(rule) => typeof rule === "object" && rule?.resourceQuery?.toString() === "/raw/"
|
|
23
|
+
var configureSWCLoader = async (baseConfig, options, nextConfig) => {
|
|
24
|
+
let isDevelopment = options.configType !== "PRODUCTION", { virtualModules } = await getVirtualModules(options), projectRoot = getProjectRoot(), loadJsConfig = nextJSLoadConfigModule.default ?? nextJSLoadConfigModule, { jsConfig } = await loadJsConfig(projectRoot, nextConfig), rawRule = baseConfig.module?.rules?.find(
|
|
25
|
+
(rule) => typeof rule == "object" && rule?.resourceQuery?.toString() === "/raw/"
|
|
34
26
|
);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}
|
|
38
|
-
const transpilePackages = nextConfig.transpilePackages ?? [];
|
|
27
|
+
rawRule && typeof rawRule == "object" && (rawRule.exclude = /^__barrel_optimize__/);
|
|
28
|
+
let transpilePackages = nextConfig.transpilePackages ?? [];
|
|
39
29
|
baseConfig.module?.rules?.push({
|
|
40
30
|
test: /\.((c|m)?(j|t)sx?)$/,
|
|
41
31
|
include: [projectRoot],
|
|
@@ -45,7 +35,7 @@ var configureSWCLoader = /* @__PURE__ */ __name(async (baseConfig, options, next
|
|
|
45
35
|
// which is not possible otherwise
|
|
46
36
|
loader: "@storybook/nextjs/next-swc-loader-patch",
|
|
47
37
|
options: {
|
|
48
|
-
isServer:
|
|
38
|
+
isServer: !1,
|
|
49
39
|
rootDir: projectRoot,
|
|
50
40
|
pagesDir: `${projectRoot}/pages`,
|
|
51
41
|
appDir: `${projectRoot}/apps`,
|
|
@@ -58,7 +48,7 @@ var configureSWCLoader = /* @__PURE__ */ __name(async (baseConfig, options, next
|
|
|
58
48
|
}
|
|
59
49
|
}
|
|
60
50
|
});
|
|
61
|
-
}
|
|
51
|
+
};
|
|
62
52
|
export {
|
|
63
53
|
configureSWCLoader
|
|
64
54
|
};
|
|
@@ -1,30 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
getNodeModulesExcludeRegex
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import {
|
|
17
|
-
__name
|
|
18
|
-
} from "./chunk-YE4AS3Q5.js";
|
|
14
|
+
} from "./chunk-AU547LNK.js";
|
|
15
|
+
import "./chunk-NVHRUSN5.js";
|
|
19
16
|
|
|
20
17
|
// src/babel/loader.ts
|
|
21
18
|
import { fileURLToPath } from "node:url";
|
|
22
19
|
import { getProjectRoot, resolvePathInStorybookCache } from "storybook/internal/common";
|
|
23
20
|
import { getVirtualModules } from "@storybook/builder-webpack5";
|
|
24
|
-
var configureBabelLoader =
|
|
25
|
-
|
|
26
|
-
const babelOptions = await options.presets.apply("babel", {}, options);
|
|
27
|
-
const typescriptOptions = await options.presets.apply("typescript", {}, options);
|
|
21
|
+
var configureBabelLoader = async (baseConfig, options, nextConfig) => {
|
|
22
|
+
let { virtualModules } = await getVirtualModules(options), babelOptions = await options.presets.apply("babel", {}, options), typescriptOptions = await options.presets.apply("typescript", {}, options);
|
|
28
23
|
baseConfig.module.rules = [
|
|
29
24
|
...baseConfig.module.rules,
|
|
30
25
|
{
|
|
@@ -45,7 +40,7 @@ var configureBabelLoader = /* @__PURE__ */ __name(async (baseConfig, options, ne
|
|
|
45
40
|
]
|
|
46
41
|
}
|
|
47
42
|
];
|
|
48
|
-
}
|
|
43
|
+
};
|
|
49
44
|
export {
|
|
50
45
|
configureBabelLoader
|
|
51
46
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -18,9 +18,8 @@ import {
|
|
|
18
18
|
resolveNextConfig,
|
|
19
19
|
scopedResolve,
|
|
20
20
|
setAlias
|
|
21
|
-
} from "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-YE4AS3Q5.js";
|
|
21
|
+
} from "./chunk-AU547LNK.js";
|
|
22
|
+
import "./chunk-NVHRUSN5.js";
|
|
24
23
|
export {
|
|
25
24
|
addScopedAlias,
|
|
26
25
|
configureRuntimeNextjsVersionResolution,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
addScopedAlias
|
|
14
|
+
} from "./chunk-AU547LNK.js";
|
|
15
|
+
import "./chunk-NVHRUSN5.js";
|
|
16
|
+
|
|
17
|
+
// src/styledJsx/webpack.ts
|
|
18
|
+
var configureStyledJsx = (baseConfig) => {
|
|
19
|
+
addScopedAlias(baseConfig, "styled-jsx");
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
configureStyledJsx
|
|
23
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -12,32 +12,26 @@ var require = CJS_COMPAT_NODE_MODULE_tpzzyiu8f1.createRequire(import.meta.url);
|
|
|
12
12
|
import {
|
|
13
13
|
configureCompatibilityAliases,
|
|
14
14
|
configureNextExportMocks
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-EONFLREF.js";
|
|
16
|
+
import "./chunk-AU547LNK.js";
|
|
17
17
|
import {
|
|
18
18
|
resolvePackageDir
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import {
|
|
21
|
-
__name
|
|
22
|
-
} from "./chunk-YE4AS3Q5.js";
|
|
19
|
+
} from "./chunk-NVHRUSN5.js";
|
|
23
20
|
|
|
24
21
|
// src/aliases/webpack.ts
|
|
25
|
-
var configureAliases =
|
|
26
|
-
configureNextExportMocks(baseConfig)
|
|
27
|
-
configureCompatibilityAliases(baseConfig);
|
|
28
|
-
baseConfig.resolve = {
|
|
22
|
+
var configureAliases = (baseConfig) => {
|
|
23
|
+
configureNextExportMocks(baseConfig), configureCompatibilityAliases(baseConfig), baseConfig.resolve = {
|
|
29
24
|
...baseConfig.resolve ?? {},
|
|
30
25
|
alias: {
|
|
31
26
|
...baseConfig.resolve?.alias ?? {},
|
|
32
27
|
"@opentelemetry/api": "next/dist/compiled/@opentelemetry/api",
|
|
33
28
|
next: resolvePackageDir("next")
|
|
34
29
|
}
|
|
35
|
-
}
|
|
36
|
-
baseConfig.ignoreWarnings = [
|
|
30
|
+
}, baseConfig.ignoreWarnings = [
|
|
37
31
|
...baseConfig.ignoreWarnings ?? [],
|
|
38
32
|
(warning) => warning.message.includes("export 'draftMode'") && warning.message.includes("next/dist/server/request/headers")
|
|
39
33
|
];
|
|
40
|
-
}
|
|
34
|
+
};
|
|
41
35
|
export {
|
|
42
36
|
configureAliases
|
|
43
37
|
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
resolvePackageDir
|
|
14
|
+
} from "./chunk-NVHRUSN5.js";
|
|
15
|
+
|
|
16
|
+
// src/css/webpack.ts
|
|
17
|
+
import { readFileSync } from "node:fs";
|
|
18
|
+
import { join } from "node:path";
|
|
19
|
+
import { fileURLToPath } from "node:url";
|
|
20
|
+
import { cssFileResolve } from "next/dist/build/webpack/config/blocks/css/loaders/file-resolve.js";
|
|
21
|
+
import { getCssModuleLocalIdent } from "next/dist/build/webpack/config/blocks/css/loaders/getCssModuleLocalIdent.js";
|
|
22
|
+
import semver from "semver";
|
|
23
|
+
var configureCss = (baseConfig, nextConfig) => {
|
|
24
|
+
let rules = baseConfig.module?.rules;
|
|
25
|
+
rules?.forEach((rule, i) => {
|
|
26
|
+
rule && typeof rule != "string" && rule.test instanceof RegExp && rule.test.test("test.css") && (rules[i] = {
|
|
27
|
+
test: /\.css$/,
|
|
28
|
+
use: [
|
|
29
|
+
fileURLToPath(import.meta.resolve("style-loader")),
|
|
30
|
+
{
|
|
31
|
+
loader: fileURLToPath(import.meta.resolve("css-loader")),
|
|
32
|
+
options: {
|
|
33
|
+
importLoaders: 1,
|
|
34
|
+
...getImportAndUrlCssLoaderOptions(nextConfig),
|
|
35
|
+
modules: {
|
|
36
|
+
auto: !0,
|
|
37
|
+
getLocalIdent: getCssModuleLocalIdent
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
fileURLToPath(import.meta.resolve("postcss-loader"))
|
|
42
|
+
],
|
|
43
|
+
// We transform the "target.css" files from next.js into Javascript
|
|
44
|
+
// for Next.js to support fonts, so it should be ignored by the css-loader.
|
|
45
|
+
exclude: /next(\\|\/|\\\\).*(\\|\/|\\\\)target\.css$/
|
|
46
|
+
});
|
|
47
|
+
}), rules?.push({
|
|
48
|
+
test: /\.(scss|sass)$/,
|
|
49
|
+
use: [
|
|
50
|
+
fileURLToPath(import.meta.resolve("style-loader")),
|
|
51
|
+
{
|
|
52
|
+
loader: fileURLToPath(import.meta.resolve("css-loader")),
|
|
53
|
+
options: {
|
|
54
|
+
importLoaders: 3,
|
|
55
|
+
...getImportAndUrlCssLoaderOptions(nextConfig),
|
|
56
|
+
modules: { auto: !0, getLocalIdent: getCssModuleLocalIdent }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
fileURLToPath(import.meta.resolve("postcss-loader")),
|
|
60
|
+
fileURLToPath(import.meta.resolve("resolve-url-loader")),
|
|
61
|
+
{
|
|
62
|
+
loader: fileURLToPath(import.meta.resolve("sass-loader")),
|
|
63
|
+
options: {
|
|
64
|
+
sourceMap: !0,
|
|
65
|
+
sassOptions: nextConfig.sassOptions,
|
|
66
|
+
additionalData: nextConfig.sassOptions?.prependData || nextConfig.sassOptions?.additionalData
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
}, getImportAndUrlCssLoaderOptions = (nextConfig) => isCssLoaderV6() ? {
|
|
72
|
+
url: {
|
|
73
|
+
filter: getUrlResolver(nextConfig)
|
|
74
|
+
},
|
|
75
|
+
import: {
|
|
76
|
+
filter: getImportResolver(nextConfig)
|
|
77
|
+
}
|
|
78
|
+
} : {
|
|
79
|
+
url: getUrlResolver(nextConfig),
|
|
80
|
+
import: getImportResolver(nextConfig)
|
|
81
|
+
}, getUrlResolver = (nextConfig) => (url, resourcePath) => cssFileResolve(url, resourcePath, nextConfig.experimental?.urlImports), getImportResolver = (nextConfig) => (url, _, resourcePath) => cssFileResolve(
|
|
82
|
+
typeof url == "string" ? url : url.url,
|
|
83
|
+
resourcePath,
|
|
84
|
+
nextConfig.experimental?.urlImports
|
|
85
|
+
), isCssLoaderV6 = () => {
|
|
86
|
+
try {
|
|
87
|
+
let cssLoaderVersion = JSON.parse(
|
|
88
|
+
readFileSync(join(resolvePackageDir("css-loader"), "package.json"), "utf8")
|
|
89
|
+
).version;
|
|
90
|
+
return semver.gte(cssLoaderVersion, "6.0.0");
|
|
91
|
+
} catch {
|
|
92
|
+
return !1;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
export {
|
|
96
|
+
configureCss
|
|
97
|
+
};
|
|
@@ -1,29 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import {
|
|
13
|
-
__name
|
|
14
|
-
} from "./chunk-YE4AS3Q5.js";
|
|
15
12
|
|
|
16
13
|
// src/fastRefresh/webpack.ts
|
|
17
14
|
import ReactRefreshWebpackPlugin from "@pmmmwh/react-refresh-webpack-plugin";
|
|
18
|
-
var configureFastRefresh =
|
|
15
|
+
var configureFastRefresh = (baseConfig) => {
|
|
19
16
|
baseConfig.plugins = [
|
|
20
17
|
...baseConfig.plugins ?? [],
|
|
21
18
|
// overlay is disabled as it is shown with caught errors in error boundaries
|
|
22
19
|
// and the next app router is using error boundaries to redirect
|
|
23
20
|
// TODO use the Next error overlay
|
|
24
|
-
new ReactRefreshWebpackPlugin({ overlay:
|
|
21
|
+
new ReactRefreshWebpackPlugin({ overlay: !1 })
|
|
25
22
|
];
|
|
26
|
-
}
|
|
23
|
+
};
|
|
27
24
|
export {
|
|
28
25
|
configureFastRefresh
|
|
29
26
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_kl8x2s4rzz from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_kl8x2s4rzz from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_kl8x2s4rzz from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_kl8x2s4rzz.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_kl8x2s4rzz.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_kl8x2s4rzz.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
|
|
13
|
+
// src/rsc/webpack.ts
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
15
|
+
var configureRSC = (baseConfig) => {
|
|
16
|
+
let resolve = baseConfig.resolve ?? {};
|
|
17
|
+
resolve.alias = {
|
|
18
|
+
...resolve.alias,
|
|
19
|
+
"server-only$": fileURLToPath(import.meta.resolve("@storybook/nextjs/rsc/server-only"))
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
configureRSC
|
|
24
|
+
};
|