Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Upgrade vue3 template to use webpack5 builder #17896

Merged
merged 1 commit into from
Apr 6, 2022

Conversation

shilman
Copy link
Member

@shilman shilman commented Apr 6, 2022

Issue: N/A CI is failing due to sb init errors on vue3 project

What I did

  • Add webpack5 builder to CLI template
  • Add version detection for webpack to conditionally trigger it

@ndelangen can we figure out the second step together? I think this change will break users running sb init on older projects.

How to test

  • CI passes

@shilman shilman added maintenance User-facing maintenance tasks cli labels Apr 6, 2022
@nx-cloud
Copy link

nx-cloud bot commented Apr 6, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit cae91d3. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@ndelangen ndelangen merged commit d5a99fd into next Apr 6, 2022
@ndelangen ndelangen deleted the fix/vue3-cli-template branch April 6, 2022 06:46
@blowsie
Copy link

blowsie commented Apr 13, 2022

This change causes build errors for me

> @ storybook C:\Projects\mglattback\client-portal-migration
> start-storybook -p 6006

info @storybook/vue3 v6.5.0-alpha.62
info 
info => Loading presets
info Addon-docs: using MDX1
info => Using PostCSS preset with postcss@8.4.12
info => Loading custom Webpack config (full-control mode).
info => Loading custom manager config
ERR! TypeError: Cannot read properties of undefined (reading 'NormalModule')
ERR!     at VueLoaderPlugin.apply (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\vue-loader@16.8.3_webpack@5
.72.0\node_modules\vue-loader\dist\pluginWebpack5.js:44:47)
ERR!     at webpack (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\w
ebpack.js:51:13)
ERR!     at starterGeneratorFn (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+builder-webpack4@6.
5.0-alpha.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\builder-webpack4\dist\cjs\index.js:137:18)
ERR!     at starterGeneratorFn.next (<anonymous>)
ERR!     at Object.start (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+builder-webpack4@6.5.0-al
pha.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\builder-webpack4\dist\cjs\index.js:275:34)
ERR!     at async Promise.all (index 0)
ERR!     at async storybookDevServer (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+core-server@6
.5.0-alpha.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\core-server\dist\cjs\dev-server.js:139:28)
ERR!     at async buildDevStandalone (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+core-server@6
.5.0-alpha.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\core-server\dist\cjs\build-dev.js:118:31)
ERR!     at async buildDev (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+core-server@6.5.0-alpha
.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\core-server\dist\cjs\build-dev.js:164:5)
ERR!  TypeError: Cannot read properties of undefined (reading 'NormalModule')
ERR!     at VueLoaderPlugin.apply (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\vue-loader@16.8.3_webpack@5
.72.0\node_modules\vue-loader\dist\pluginWebpack5.js:44:47)
ERR!     at webpack (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\w
ebpack.js:51:13)
ERR!     at starterGeneratorFn (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+builder-webpack4@6.
5.0-alpha.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\builder-webpack4\dist\cjs\index.js:137:18)
ERR!     at starterGeneratorFn.next (<anonymous>)
ERR!     at Object.start (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+builder-webpack4@6.5.0-al
pha.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\builder-webpack4\dist\cjs\index.js:275:34)
ERR!     at async Promise.all (index 0)
ERR!     at async storybookDevServer (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+core-server@6
.5.0-alpha.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\core-server\dist\cjs\dev-server.js:139:28)
ERR!     at async buildDevStandalone (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+core-server@6
.5.0-alpha.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\core-server\dist\cjs\build-dev.js:118:31)
ERR!     at async buildDev (C:\Projects\mglattback\client-portal-migration\node_modules\.pnpm\@storybook+core-server@6.5.0-alpha
.62_c877713ce33e4413ea1785bef181a838\node_modules\@storybook\core-server\dist\cjs\build-dev.js:164:5)

@PsTiu
Copy link

PsTiu commented May 18, 2022

try @storybook/builder-webpack5 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli maintenance User-facing maintenance tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants