@modern-js/plugin-module-polyfill 2.3.0 → 2.5.0
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 +11 -4
- package/package.json +7 -7
package/README.md
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
# @modern-js/plugin-module-polyfill
|
2
2
|
|
3
|
-
|
3
|
+
The polyfill plugin of Modern.js Module Tools.
|
4
4
|
|
5
5
|
A Library author don't want to "pollute" the global scope with the polyfills you are loading. This plugin injects imports to polyfills for unsupported features which are used in your code, without attaching the polyfills to the global scope but importing them as normal functions.
|
6
6
|
|
7
7
|
**Note: It will not transform syntax by targets**
|
8
8
|
|
9
|
-
|
10
9
|
## Usage
|
11
10
|
|
12
|
-
```
|
11
|
+
```ts
|
13
12
|
import { defineConfig } from '@modern-js/module-tools';
|
14
13
|
import { ModulePolyfillPlugin } from '@modern-js/plugin-module-polyfill';
|
15
14
|
export default defineConfig({
|
@@ -21,7 +20,15 @@ export default defineConfig({
|
|
21
20
|
});
|
22
21
|
```
|
23
22
|
|
23
|
+
## Documentation
|
24
|
+
|
25
|
+
- [English Documentation](https://modernjs.dev/module-tools/en)
|
26
|
+
- [中文文档](https://modernjs.dev/module-tools/)
|
24
27
|
|
25
28
|
## Contributing
|
26
29
|
|
27
|
-
|
30
|
+
Please read the [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md).
|
31
|
+
|
32
|
+
## License
|
33
|
+
|
34
|
+
Modern.js is [MIT licensed](https://github.com/modern-js-dev/modern.js/blob/main/LICENSE).
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@modern-js/plugin-module-polyfill",
|
3
|
-
"description": "The
|
4
|
-
"homepage": "https://modernjs.dev",
|
3
|
+
"description": "The polyfill plugin of Modern.js Module Tools.",
|
4
|
+
"homepage": "https://modernjs.dev/module-tools",
|
5
5
|
"bugs": "https://github.com/modern-js-dev/modern.js/issues",
|
6
6
|
"repository": "modern-js-dev/modern.js",
|
7
7
|
"license": "MIT",
|
@@ -11,7 +11,7 @@
|
|
11
11
|
"modern",
|
12
12
|
"modern.js"
|
13
13
|
],
|
14
|
-
"version": "2.
|
14
|
+
"version": "2.5.0",
|
15
15
|
"types": "./dist/types/index.d.ts",
|
16
16
|
"main": "./dist/index.js",
|
17
17
|
"devDependencies": {
|
@@ -19,12 +19,12 @@
|
|
19
19
|
"@types/node": "^14",
|
20
20
|
"typescript": "^4",
|
21
21
|
"jest": "^27",
|
22
|
-
"@
|
23
|
-
"@scripts/
|
24
|
-
"@
|
22
|
+
"@modern-js/module-tools": "2.5.0",
|
23
|
+
"@scripts/jest-config": "2.5.0",
|
24
|
+
"@scripts/build": "2.5.0"
|
25
25
|
},
|
26
26
|
"peerDependencies": {
|
27
|
-
"@modern-js/module-tools": "^2.
|
27
|
+
"@modern-js/module-tools": "^2.5.0",
|
28
28
|
"core-js-pure": "^3.25.0"
|
29
29
|
},
|
30
30
|
"dependencies": {
|