Skip to content

Commit 8619661

Browse files
committed
Document externals option
1 parent efe155a commit 8619661

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

packages/webpack-plugin/src/plugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ export interface PluginOptions {
5757
test?: RuleSetRule['test'];
5858
identifiers?: IdentifierOption;
5959
outputCss?: boolean;
60+
/**
61+
* Effectively `ExternalItem[]` from webpack. Currently typed as `any` as this type was
62+
* previously not exposed. The `any` type will be fixed in the next major version.
63+
*/
6064
externals?: any;
6165
/** @deprecated */
6266
allowRuntime?: boolean;

site/docs/integrations/next.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,14 @@ const withVanillaExtract = createVanillaExtractPlugin({
7676

7777
Each integration will set a default value based on the configuration options passed to the bundler.
7878

79+
### externals
80+
81+
Effectively [`ExternalItem[]`] from webpack.
82+
Currently typed as `any` as this type was previously not exposed.
83+
The `any` type will be fixed in the next major version.
84+
85+
[`ExternalItem[]`]: https://github.com/webpack/webpack/blob/9211be0f7a04feb45e1074e6cf848a657dd82ebc/declarations/WebpackOptions.d.ts#L207-L211
86+
7987
### unstable_turbopack
8088

8189
> ⚠️  Turbopack support is experimental. Its API is unstable and may undergo breaking changes in non-major versions. Additionally, it may not handle all features supported by Next.js.

site/docs/integrations/webpack.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,11 @@ new VanillaExtractPlugin({
102102
```
103103

104104
Each integration will set a default value based on the configuration options passed to the bundler.
105+
106+
### externals
107+
108+
Effectively [`ExternalItem[]`] from webpack.
109+
Currently typed as `any` as this type was previously not exposed.
110+
The `any` type will be fixed in the next major version.
111+
112+
[`ExternalItem[]`]: https://github.com/webpack/webpack/blob/9211be0f7a04feb45e1074e6cf848a657dd82ebc/declarations/WebpackOptions.d.ts#L207-L211

0 commit comments

Comments
 (0)