vite-plugin-storybook-nextjs 1.0.12--canary.d4880e6.0 → 1.0.12--canary.23.ea692b3.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/README.md +2 -3
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
This is a Vite plugin that allows you to use Next.js features in Vite. It is the basis for `@storybook/experimental-nextjs-vite` and should be used when running portable stories in Vitest.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
|
-
|
|
7
6
|
- **Next.js Integration**: Seamlessly integrate Next.js features into your Vite project.
|
|
8
7
|
- **Storybook Compatibility**: Acts as the foundation for [the `@storybook/experimental-nextjs-vite` framework](https://storybook.js.org/docs/get-started/frameworks/nextjs#with-vite), enabling you to use Storybook with Next.js in a Vite environment.
|
|
9
8
|
- **Portable Stories**: Ideal for running portable stories in Vitest, ensuring your components are tested in an environment that closely mirrors production.
|
|
@@ -116,12 +115,12 @@ When testing components that rely on Next.js Server Actions, you need to ensure
|
|
|
116
115
|
|
|
117
116
|
```ts
|
|
118
117
|
// vitest.config.ts
|
|
119
|
-
import { defineConfig } from "
|
|
118
|
+
import { defineConfig } from "vitest/config";
|
|
120
119
|
import nextjs from "vite-plugin-storybook-nextjs";
|
|
121
120
|
|
|
122
121
|
export default defineConfig({
|
|
123
122
|
plugins: [nextjs()],
|
|
124
|
-
|
|
123
|
+
test: {
|
|
125
124
|
environment: "jsdom", // 👈 Add this
|
|
126
125
|
},
|
|
127
126
|
});
|
package/dist/index.cjs
CHANGED
|
@@ -975,11 +975,11 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
975
975
|
alias: [
|
|
976
976
|
{
|
|
977
977
|
find: /^react$/,
|
|
978
|
-
replacement: "next/dist/compiled/react"
|
|
978
|
+
replacement: require6.resolve("next/dist/compiled/react")
|
|
979
979
|
},
|
|
980
980
|
{
|
|
981
981
|
find: /^react-dom$/,
|
|
982
|
-
replacement: "next/dist/compiled/react-dom"
|
|
982
|
+
replacement: require6.resolve("next/dist/compiled/react-dom")
|
|
983
983
|
},
|
|
984
984
|
{
|
|
985
985
|
find: /^react-dom\/server$/,
|
package/dist/index.js
CHANGED
|
@@ -941,11 +941,11 @@ function VitePlugin({ dir = process.cwd() } = {}) {
|
|
|
941
941
|
alias: [
|
|
942
942
|
{
|
|
943
943
|
find: /^react$/,
|
|
944
|
-
replacement: "next/dist/compiled/react"
|
|
944
|
+
replacement: require6.resolve("next/dist/compiled/react")
|
|
945
945
|
},
|
|
946
946
|
{
|
|
947
947
|
find: /^react-dom$/,
|
|
948
|
-
replacement: "next/dist/compiled/react-dom"
|
|
948
|
+
replacement: require6.resolve("next/dist/compiled/react-dom")
|
|
949
949
|
},
|
|
950
950
|
{
|
|
951
951
|
find: /^react-dom\/server$/,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-storybook-nextjs",
|
|
3
|
-
"version": "1.0.12--canary.
|
|
3
|
+
"version": "1.0.12--canary.23.ea692b3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite-plugin",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react": "^18",
|
|
76
76
|
"rollup": "^4.18.0",
|
|
77
77
|
"sharp": "^0.33.4",
|
|
78
|
-
"storybook": "8.3.0
|
|
78
|
+
"storybook": "^8.3.0",
|
|
79
79
|
"tsup": "^8.1.0",
|
|
80
80
|
"typescript": "^5.0.0",
|
|
81
81
|
"vite": "^5.0.0",
|