docs(webpack): enhance titles for SEO (#14745)
This commit is contained in:
parent
85543100ba
commit
d9b89e45aa
@ -1,7 +1,7 @@
|
|||||||
# Customize your Webpack Config
|
# Customize your Webpack Config
|
||||||
|
|
||||||
{% callout type="note" title="Webpack Config Setup" %}
|
{% callout type="note" title="Webpack Config Setup" %}
|
||||||
This guide helps you customize your webpack config - add extra functionality and support for other frameworks or features. To see how you can set up a basic webpack config for Nx, read the [Webpack Config Setup guide](/packages/webpack/documents/webpack-config-setup).
|
This guide helps you customize your webpack config - add extra functionality and support for other frameworks or features. To see how you can set up a basic webpack config for Nx, read the [Nx Webpack configuration guide](/packages/webpack/documents/webpack-config-setup).
|
||||||
{% /callout %}
|
{% /callout %}
|
||||||
|
|
||||||
For most apps, the default configuration of webpack is sufficient, but sometimes you need to tweak a setting in your webpack config. This guide explains how to make a small change without taking on the maintenance burden of the entire webpack config.
|
For most apps, the default configuration of webpack is sufficient, but sometimes you need to tweak a setting in your webpack config. This guide explains how to make a small change without taking on the maintenance burden of the entire webpack config.
|
||||||
|
|||||||
@ -7,7 +7,7 @@ The Nx plugin for [webpack](https://webpack.js.org/).
|
|||||||
|
|
||||||
[Webpack](https://webpack.js.org/) is a static module bundler for modern JavaScript applications. The `@nrwl/webpack` plugin provides executors that allow you to build and serve your projects using webpack, plus an executor for SSR.
|
[Webpack](https://webpack.js.org/) is a static module bundler for modern JavaScript applications. The `@nrwl/webpack` plugin provides executors that allow you to build and serve your projects using webpack, plus an executor for SSR.
|
||||||
|
|
||||||
Nx now allows you to [customize your webpack configuration](/packages/webpack/documents/webpack-config-setup) for your projects. And we also offer [a number of plugins](/packages/webpack/documents/webpack-plugins) for supporting Nx and other frameworks.
|
Nx now allows you to [customize your webpack configuration](/packages/webpack/documents/webpack-config-setup) for your projects. And we also offer [a number of webpack plugins](/packages/webpack/documents/webpack-plugins) for supporting Nx and other frameworks.
|
||||||
|
|
||||||
## Setting up a new Nx workspace with Webpack
|
## Setting up a new Nx workspace with Webpack
|
||||||
|
|
||||||
|
|||||||
@ -96,7 +96,7 @@ You may still reconfigure everything manually, without using the Nx plugins. How
|
|||||||
|
|
||||||
For most apps, the default configuration of webpack is sufficient, but sometimes you need to tweak a setting in your webpack config. This guide explains how to make a small change without taking on the maintenance burden of the entire webpack config.
|
For most apps, the default configuration of webpack is sufficient, but sometimes you need to tweak a setting in your webpack config. This guide explains how to make a small change without taking on the maintenance burden of the entire webpack config.
|
||||||
|
|
||||||
### React projects
|
### Configure webpack for React projects
|
||||||
|
|
||||||
React projects use the `@nrwl/react` package to build their apps. This package provides a `withReact` plugin that adds the necessary configuration for React to work with webpack. You can use this plugin to add the necessary configuration to your webpack config.
|
React projects use the `@nrwl/react` package to build their apps. This package provides a `withReact` plugin that adds the necessary configuration for React to work with webpack. You can use this plugin to add the necessary configuration to your webpack config.
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ module.exports = composePlugins(
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
### Add a custom Webpack Loader
|
### Add a CSS loader to your webpack config
|
||||||
|
|
||||||
To add the `css-loader` to your config, install it and add the rule.
|
To add the `css-loader` to your config, install it and add the rule.
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ module.exports = composePlugins(withNx(), (config, { options, context }) => {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
### Module Federation
|
### Configure webpack for Module Federation
|
||||||
|
|
||||||
If you use the [Module Federation](/recipes/module-federation/faster-builds) support from `@nrwl/angular` or `@nrwl/react` then
|
If you use the [Module Federation](/recipes/module-federation/faster-builds) support from `@nrwl/angular` or `@nrwl/react` then
|
||||||
you can customize your webpack configuration as follows.
|
you can customize your webpack configuration as follows.
|
||||||
@ -180,7 +180,7 @@ module.exports = composePlugins(withNx(), (config, { options, context }) => {
|
|||||||
Reference the [webpack documentation](https://webpack.js.org/configuration/) for details on the structure of the webpack
|
Reference the [webpack documentation](https://webpack.js.org/configuration/) for details on the structure of the webpack
|
||||||
config object.
|
config object.
|
||||||
|
|
||||||
### Next.js Applications
|
### Configure webpack for Next.js Applications
|
||||||
|
|
||||||
Next.js supports webpack customization in the `next.config.js` file.
|
Next.js supports webpack customization in the `next.config.js` file.
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ Nx uses enhanced webpack configuration files (e.g. `webpack.config.js`). These c
|
|||||||
functionality to the webpack build.
|
functionality to the webpack build.
|
||||||
|
|
||||||
This guide contains information on the plugins provided by Nx. For more information on customizing webpack configuration, refer to the
|
This guide contains information on the plugins provided by Nx. For more information on customizing webpack configuration, refer to the
|
||||||
[configuration guide](/packages/webpack/documents/webpack-config-setup).
|
[Nx Webpack configuration guide](/packages/webpack/documents/webpack-config-setup).
|
||||||
|
|
||||||
## withNx
|
## withNx
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@ The Nx plugin for [webpack](https://webpack.js.org/).
|
|||||||
|
|
||||||
[Webpack](https://webpack.js.org/) is a static module bundler for modern JavaScript applications. The `@nrwl/webpack` plugin provides executors that allow you to build and serve your projects using webpack, plus an executor for SSR.
|
[Webpack](https://webpack.js.org/) is a static module bundler for modern JavaScript applications. The `@nrwl/webpack` plugin provides executors that allow you to build and serve your projects using webpack, plus an executor for SSR.
|
||||||
|
|
||||||
Nx now allows you to [customize your webpack configuration](/packages/webpack/documents/webpack-config-setup) for your projects. And we also offer [a number of plugins](/packages/webpack/documents/webpack-plugins) for supporting Nx and other frameworks.
|
Nx now allows you to [customize your webpack configuration](/packages/webpack/documents/webpack-config-setup) for your projects. And we also offer [a number of webpack plugins](/packages/webpack/documents/webpack-plugins) for supporting Nx and other frameworks.
|
||||||
|
|
||||||
## Setting up a new Nx workspace with Webpack
|
## Setting up a new Nx workspace with Webpack
|
||||||
|
|
||||||
|
|||||||
@ -96,7 +96,7 @@ You may still reconfigure everything manually, without using the Nx plugins. How
|
|||||||
|
|
||||||
For most apps, the default configuration of webpack is sufficient, but sometimes you need to tweak a setting in your webpack config. This guide explains how to make a small change without taking on the maintenance burden of the entire webpack config.
|
For most apps, the default configuration of webpack is sufficient, but sometimes you need to tweak a setting in your webpack config. This guide explains how to make a small change without taking on the maintenance burden of the entire webpack config.
|
||||||
|
|
||||||
### React projects
|
### Configure webpack for React projects
|
||||||
|
|
||||||
React projects use the `@nrwl/react` package to build their apps. This package provides a `withReact` plugin that adds the necessary configuration for React to work with webpack. You can use this plugin to add the necessary configuration to your webpack config.
|
React projects use the `@nrwl/react` package to build their apps. This package provides a `withReact` plugin that adds the necessary configuration for React to work with webpack. You can use this plugin to add the necessary configuration to your webpack config.
|
||||||
|
|
||||||
@ -116,7 +116,7 @@ module.exports = composePlugins(
|
|||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
### Add a custom Webpack Loader
|
### Add a CSS loader to your webpack config
|
||||||
|
|
||||||
To add the `css-loader` to your config, install it and add the rule.
|
To add the `css-loader` to your config, install it and add the rule.
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ module.exports = composePlugins(withNx(), (config, { options, context }) => {
|
|||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
### Module Federation
|
### Configure webpack for Module Federation
|
||||||
|
|
||||||
If you use the [Module Federation](/recipes/module-federation/faster-builds) support from `@nrwl/angular` or `@nrwl/react` then
|
If you use the [Module Federation](/recipes/module-federation/faster-builds) support from `@nrwl/angular` or `@nrwl/react` then
|
||||||
you can customize your webpack configuration as follows.
|
you can customize your webpack configuration as follows.
|
||||||
@ -180,7 +180,7 @@ module.exports = composePlugins(withNx(), (config, { options, context }) => {
|
|||||||
Reference the [webpack documentation](https://webpack.js.org/configuration/) for details on the structure of the webpack
|
Reference the [webpack documentation](https://webpack.js.org/configuration/) for details on the structure of the webpack
|
||||||
config object.
|
config object.
|
||||||
|
|
||||||
### Next.js Applications
|
### Configure webpack for Next.js Applications
|
||||||
|
|
||||||
Next.js supports webpack customization in the `next.config.js` file.
|
Next.js supports webpack customization in the `next.config.js` file.
|
||||||
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@ Nx uses enhanced webpack configuration files (e.g. `webpack.config.js`). These c
|
|||||||
functionality to the webpack build.
|
functionality to the webpack build.
|
||||||
|
|
||||||
This guide contains information on the plugins provided by Nx. For more information on customizing webpack configuration, refer to the
|
This guide contains information on the plugins provided by Nx. For more information on customizing webpack configuration, refer to the
|
||||||
[configuration guide](/packages/webpack/documents/webpack-config-setup).
|
[Nx Webpack configuration guide](/packages/webpack/documents/webpack-config-setup).
|
||||||
|
|
||||||
## withNx
|
## withNx
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user