Skip to content

Commit

Permalink
Add Webpack Commands to docs (#1242)
Browse files Browse the repository at this point in the history
Webpack inspection commands [were added in this pr](nuxt/nuxt#7029).  Documenting them so that people are aware
  • Loading branch information
Austio authored Feb 10, 2021
1 parent b3878e2 commit 09dc90b
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions content/en/guides/get-started/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,31 @@ You can run different commands depending on the [target](/docs/2.x/features/depl
- **nuxt generate** - Build the application (if needed), generate every route as a HTML file and statically export to `dist/` directory (used for static hosting).
- **nuxt start** - serve the `dist/` directory like your static hosting would do (Netlify, Vercel, Surge, etc), great for testing before deploying.

## Webpack Config Inspection

You can generate the webpack config with an api heavily inspired by [vue inspect](https://cli.vuejs.org/guide/webpack.html#inspecting-the-project-s-webpack-config)

- **nuxt webpack [query...]**

Options:

--name: Bundle name to inspect. (client, server, modern)
--dev: Inspect webpack config for dev mode
--depth: Inspection depth. Defaults to 2 to prevent verbose output.
--no-colors: Disable ANSI colors (disabled by default when TTY is not available or when piping to a file)

Examples:

- **nuxt webpack**
- **nuxt webpack devtool**
- **nuxt webpack resolve alias**
- **nuxt webpack module rules**
- **nuxt webpack module rules test=.jsx**
- **nuxt webpack module rules test=.pug oneOf use.0=raw**
- **nuxt webpack plugins constructor.name=WebpackBar options reporter**
- **nuxt webpack module rules loader=vue-**
- **nuxt webpack module rules "loader=.*-loader"**

## Production Deployment

Nuxt.js lets you choose between Server or Static deployments.
Expand Down

0 comments on commit 09dc90b

Please sign in to comment.