webpack-federation-types-plugin 1.2.4 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
# webpack-federation-types-plugin
|
|
2
2
|
|
|
3
|
-
This plugin
|
|
3
|
+
This plugin generates TypeScript type declaration files for the modules that are exposed by a remote application.
|
|
4
|
+
With this plugin, you can get type definitions for your modules and use them in your consuming applications without having to manually import and maintain them.
|
|
5
|
+
|
|
4
6
|
It compiles the exposed files into type declaration files and shares them as public files
|
|
5
|
-
On the consumer side
|
|
7
|
+
On the consumer side, the plugin fetches the remote types declaration files and adds them to the "node_modules/@types" directory. This is the standard location for TypeScript type definitions that are used by the consuming application. By placing the generated type declaration files in this directory, the plugin makes them available to the consuming application without the need for any additional configuration.
|
|
6
8
|
|
|
7
9
|
## Installation
|
|
8
10
|
|
|
11
|
+
You can install the plugin by running the following command in your terminal:
|
|
12
|
+
|
|
9
13
|
`npm i --save-dev webpack-federation-types-plugin`
|
|
10
14
|
|
|
11
15
|
`yarn add --dev webpack-federation-types-plugin`
|
|
12
16
|
|
|
13
17
|
## Usage
|
|
14
18
|
|
|
19
|
+
After installing the plugin, you can use it in your webpack configuration file as follows:
|
|
20
|
+
|
|
15
21
|
```javascript
|
|
16
22
|
const FederationTypesPlugin = require("webpack-federation-types-plugin")
|
|
17
23
|
|
|
@@ -25,6 +31,8 @@ module.exports = {
|
|
|
25
31
|
|
|
26
32
|
## Plugin Options
|
|
27
33
|
|
|
34
|
+
The plugin takes an options object with the following properties:
|
|
35
|
+
|
|
28
36
|
##### exposeTypes
|
|
29
37
|
|
|
30
38
|
Type: boolean
|
package/package.json
CHANGED