vite-plugin-storybook-nextjs 1.1.3--canary.35.2184b9c.0 → 1.1.4--canary.36.0ae4f28.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 +8 -1
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2855,6 +2855,13 @@ var loadConfig = (
|
|
|
2855
2855
|
function VitePlugin({ dir = process.cwd() } = {}) {
|
|
2856
2856
|
const resolvedDir = path2.resolve(dir);
|
|
2857
2857
|
const nextConfigResolver = Promise.withResolvers();
|
|
2858
|
+
let styledJsxIsInstalled;
|
|
2859
|
+
try {
|
|
2860
|
+
require8.resolve("styled-jsx");
|
|
2861
|
+
styledJsxIsInstalled = true;
|
|
2862
|
+
} catch (e) {
|
|
2863
|
+
styledJsxIsInstalled = false;
|
|
2864
|
+
}
|
|
2858
2865
|
return [
|
|
2859
2866
|
{
|
|
2860
2867
|
name: "vite-plugin-storybook-nextjs",
|
|
@@ -2928,7 +2935,7 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
2928
2935
|
"next/image",
|
|
2929
2936
|
"next/legacy/image",
|
|
2930
2937
|
"react/jsx-dev-runtime",
|
|
2931
|
-
"styled-jsx/style"
|
|
2938
|
+
...styledJsxIsInstalled ? ["styled-jsx/style"] : []
|
|
2932
2939
|
]
|
|
2933
2940
|
},
|
|
2934
2941
|
test: {
|
package/dist/index.js
CHANGED
|
@@ -2822,6 +2822,13 @@ var loadConfig = (
|
|
|
2822
2822
|
function VitePlugin({ dir = process.cwd() } = {}) {
|
|
2823
2823
|
const resolvedDir = resolve(dir);
|
|
2824
2824
|
const nextConfigResolver = Promise.withResolvers();
|
|
2825
|
+
let styledJsxIsInstalled;
|
|
2826
|
+
try {
|
|
2827
|
+
require8.resolve("styled-jsx");
|
|
2828
|
+
styledJsxIsInstalled = true;
|
|
2829
|
+
} catch (e) {
|
|
2830
|
+
styledJsxIsInstalled = false;
|
|
2831
|
+
}
|
|
2825
2832
|
return [
|
|
2826
2833
|
{
|
|
2827
2834
|
name: "vite-plugin-storybook-nextjs",
|
|
@@ -2895,7 +2902,7 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
2895
2902
|
"next/image",
|
|
2896
2903
|
"next/legacy/image",
|
|
2897
2904
|
"react/jsx-dev-runtime",
|
|
2898
|
-
"styled-jsx/style"
|
|
2905
|
+
...styledJsxIsInstalled ? ["styled-jsx/style"] : []
|
|
2899
2906
|
]
|
|
2900
2907
|
},
|
|
2901
2908
|
test: {
|