support for extending build within `nuxt.config`
See original GitHub issueEnvironment
- Operating System:
Darwin
- Node Version:
v14.17.0
- Nuxt Version:
3.0.0-27277498.850ef69
- Package Manager:
yarn@1.22.17
- Bundler:
Vite
- User Config:
target
,css
,publicRuntimeConfig
,buildModules
,modules
,intlify
,robots
,build
- Runtime Modules:
@nuxtjs/robots@2.5.0
- Build Modules:
nuxt-windicss@2.0.12
,@intlify/nuxt3@0.1.8
Reproduction
https://codesandbox.io/s/gallant-danny-xuwkr?file=/nuxt.config.ts
Describe the bug
I am trying to add a loader to my nuxt application.
in Nuxt 2 I usually use the build.extend function to extend rules and add my rule, but in Nuxt 3 I am not able to do that.
If you look at reproduction, there is a type error for extend
key on error.
How to do that? In documentation is missing.
Thank you for help!
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Configuration - Nuxt
You can extend nuxt's webpack configuration via the extend option in your nuxt.config.js . The extend option of the build property is a...
Read more >The build Property - Nuxt
Extend the webpack configuration manually for the client & server bundles. ... The extend is called twice, one time for the server bundle,...
Read more >Nuxt configuration file
This option lets you define the CSS files, modules, and libraries you want to include globally (on every page). ... You can omit...
Read more >The extendPlugins Property - Nuxt
The extendPlugins property lets you customize Nuxt plugins. (options.plugins ). ... You may want to extend plugins or change plugins order created by...
Read more >Commands and Deployment - Nuxt
nuxt dev - Launch the development server. · nuxt build - Build and optimize your application with webpack for production. · nuxt start...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For now, for vite, you can use
vite:extend
orvite:extendConfig
. For webpack, you can usewebpack:config
.I think we’ve decided that the best approach is to use direct configuration of
vite
orwebpack
keys, hooks, or a custom module withextendWebpackConfig
,extendViteConfig
,addWebpackPlugin
oraddVitePlugin
(utilities exported from@nuxt/kit
).cc: @pi0