1337 Commits

Author SHA1 Message Date
Valentin Palkovic
902dc18344 Fix webpack DefinePlugin import to use default export 2024-12-13 12:51:52 +01:00
Valentin Palkovic
980282f955
Merge branch 'next' into fix-nextjs-webpack-fscache 2024-12-13 11:09:03 +01:00
storybook-bot
00b669f8a5 Bump version from "8.5.0-alpha.20" to "8.5.0-alpha.21" [skip ci] 2024-12-12 11:18:42 +00:00
storybook-bot
a0b8f06ac7 Bump version from "8.5.0-alpha.19" to "8.5.0-alpha.20" [skip ci] 2024-12-11 01:30:19 +00:00
storybook-bot
71af1b86d4 Bump version from "8.5.0-alpha.18" to "8.5.0-alpha.19" [skip ci] 2024-12-10 08:03:34 +00:00
storybook-bot
93ae36792b Bump version from "8.5.0-alpha.17" to "8.5.0-alpha.18" [skip ci] 2024-12-05 16:02:25 +00:00
storybook-bot
8735b15e5c Bump version from "8.5.0-alpha.16" to "8.5.0-alpha.17" [skip ci] 2024-12-04 12:48:33 +00:00
Kevin Yank
c00c054199 Undo unintentional formatting change 2024-12-04 10:42:43 +11:00
storybook-bot
e1b5e29bc7 Bump version from "8.5.0-alpha.15" to "8.5.0-alpha.16" [skip ci] 2024-12-03 23:38:17 +00:00
storybook-bot
a8ad83fe63 Bump version from "8.5.0-alpha.14" to "8.5.0-alpha.15" [skip ci] 2024-12-03 01:43:00 +00:00
Kevin Yank
83a1f24f02 Defer all imports from webpack until after Next.js has loaded its internal instance 2024-12-03 12:27:09 +11:00
storybook-bot
f359e2bb4b Bump version from "8.5.0-alpha.13" to "8.5.0-alpha.14" [skip ci] 2024-11-30 16:59:42 +00:00
storybook-bot
d3bc3ffb0b Bump version from "8.5.0-alpha.12" to "8.5.0-alpha.13" [skip ci] 2024-11-29 09:32:25 +00:00
storybook-bot
b53665b649 Bump version from "8.5.0-alpha.11" to "8.5.0-alpha.12" [skip ci] 2024-11-29 08:31:42 +00:00
storybook-bot
da1f1a04c0 Bump version from "8.5.0-alpha.10" to "8.5.0-alpha.11" [skip ci] 2024-11-27 13:27:52 +00:00
Kevin Yank
0a3e05bcea Fix crash when framework is not specified with options 2024-11-27 11:54:46 +11:00
storybook-bot
04da03eac2 Bump version from "8.5.0-alpha.9" to "8.5.0-alpha.10" [skip ci] 2024-11-21 15:31:16 +00:00
storybook-bot
c9f6fa2372 Bump version from "8.5.0-alpha.8" to "8.5.0-alpha.9" [skip ci] 2024-11-20 13:53:24 +00:00
Yann Braga
9794e35ee5
Merge pull request #29640 from storybookjs/yann/next-15-support-vite
Nextjs-Vite: Add Next.js 15 support
2024-11-20 10:01:43 +01:00
storybook-bot
7f1b383785 Bump version from "8.5.0-alpha.7" to "8.5.0-alpha.8" [skip ci] 2024-11-19 15:00:07 +00:00
Yann Braga
dd9ed96ee6 skip certain stories in vitest integration 2024-11-19 09:06:04 +01:00
Kevin Yank
2a02e13480 Fix webpack fsCache not working with @storybook/nextjs
Next.js overrides certain internal webpack packages (particularly `webpack-sources`), which are involved with filesystem caching, with its own versions from next/dist/compiled.

For filesystem caching to work, Next.js must be allowed to perform these overrides before webpack is first initialized by @storybook/builder-webpack5. If it is not, the objects to be serialized to disk in the caching process will be instantiated using the original (non-Next.js) modules, but the serializers will be created using the Next.js modules. This mismatch between the objects to be cached and the serializers that write the filesystem cache prevents the cache from being written; instead, webpack outputs a warning message to the console for every object that it tries and fails to find a matching serializer for.

This fix works by invoking Next.js to configure webpack in the `core` hook of @storybook/nextjs/preset, immediately before loading @storybook/builder-webpack5. We don't actually use this configuration that Next.js creates; the actual configuration that will be used in the build is still generated in `webpackFinal` as before.

`fsCache` has a large impact on Storybook build performance. Even in a minimal project with a single story, enabling it reduces build time by 66%! This is therefore a very valuable option to be able to enable.

Fixes #29621
2024-11-19 18:14:41 +11:00
storybook-bot
bebc9dbd23 Bump version from "8.5.0-alpha.6" to "8.5.0-alpha.7" [skip ci] 2024-11-19 00:41:34 +00:00
Yann Braga
1b724597e8 use updated vite plugin 2024-11-18 22:15:56 +01:00
storybook-bot
56952c73d0 Bump version from "8.5.0-alpha.5" to "8.5.0-alpha.6" [skip ci] 2024-11-18 13:22:44 +00:00
Yann Braga
158e30d7f2 wip 2024-11-18 12:30:17 +01:00
storybook-bot
b87b71015a Bump version from "8.5.0-alpha.4" to "8.5.0-alpha.5" [skip ci] 2024-11-16 06:18:51 +00:00
storybook-bot
7d3bbd7580 Bump version from "8.5.0-alpha.3" to "8.5.0-alpha.4" [skip ci] 2024-11-12 14:57:10 +00:00
Yann Braga
fa533f1774 move more stories out of next 13 2024-11-12 14:14:05 +01:00
Yann Braga
12be898f8b exclude server action stories to run in next 13 2024-11-12 11:28:58 +01:00
Yann Braga
4d3c6d96fb fix types 2024-11-12 09:47:08 +01:00
Yann Braga
2ac6955886 fix types 2024-11-12 09:33:30 +01:00
Yann Braga
104bfccaf0 rework compatibility for draft-mode 2024-11-12 08:57:48 +01:00
Yann Braga
7cde000a51 fix 2024-11-12 07:50:19 +01:00
Yann Braga
a2b92457e8 Move nextjs stories to common template directory, add Nextjs 14 sandbox 2024-11-12 07:22:21 +01:00
Yann Braga
59df579fbc Nextjs: Add support for Next 15 2024-11-11 14:42:22 +01:00
storybook-bot
85055fa454 Bump version from "8.5.0-alpha.2" to "8.5.0-alpha.3" [skip ci] 2024-11-05 05:41:54 +00:00
jonniebigodes
ca259ba747
Merge branch 'next' into remove-duplicate-comments 2024-11-04 15:11:07 +00:00
storybook-bot
82f7c96303 Bump version from "8.5.0-alpha.1" to "8.5.0-alpha.2" [skip ci] 2024-11-02 03:41:18 +00:00
Valentin Palkovic
bc837ac006
Merge pull request #29264 from HoncharenkoZhenya/next
Next.js: Upgrade sass-loader from ^13.2.0 to ^14.2.1
2024-11-01 12:45:37 +01:00
Valentin Palkovic
6c829c545e
Merge pull request #29444 from sentience/fix-nextjs-react-paths-in-monorepo
Next.js: Fix bundled react and react-dom in monorepos
2024-11-01 12:43:11 +01:00
storybook-bot
7b09834c47 Bump version from "8.5.0-alpha.0" to "8.5.0-alpha.1" [skip ci] 2024-10-31 17:41:10 +00:00
storybook-bot
3d3781df4d Bump version from "8.4.0" to "8.5.0-alpha.0" [skip ci] 2024-10-31 12:58:43 +00:00
storybook-bot
939651b867 Bump version from "8.4.0-beta.5" to "8.4.0" [skip ci] 2024-10-31 11:59:59 +00:00
Kevin Yank
e9ee80ddd0 Merge remote-tracking branch 'origin/next' into fix-nextjs-react-paths-in-monorepo 2024-10-31 15:18:42 +11:00
Kevin Yank
e8a9166ddd Enable scopedResolve to accept script file references
The previous implementation supported relative references to packages
(e.g. `next/dist/compiled/react-dom`)
and named exports
(e.g. `next/dist/compiled/react-dom/client`),
but not references to physical script files within packages
(e.g. `next/dist/compiled/react-dom/cjs/react-dom-test-utils.production.js`).

The latter are now handled by detecting when require.resolve returns a path and filename that ends with the exact string provided to the function.
2024-10-31 15:13:53 +11:00
Kevin Yank
cb540e448f Fix spelling in comment 2024-10-31 14:27:19 +11:00
storybook-bot
e94dc925e1 Bump version from "8.4.0-beta.4" to "8.4.0-beta.5" [skip ci] 2024-10-30 17:21:44 +00:00
storybook-bot
c6dc5f63f1 Bump version from "8.4.0-beta.3" to "8.4.0-beta.4" [skip ci] 2024-10-30 11:43:42 +00:00
storybook-bot
72b24f843b Bump version from "8.4.0-beta.2" to "8.4.0-beta.3" [skip ci] 2024-10-29 15:11:49 +00:00