@modern-js/plugin-module-babel 2.21.0 → 2.22.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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @modern-js/plugin-module-babel
2
2
 
3
+ ## 2.22.0
4
+
5
+ ### Patch Changes
6
+
7
+ - ad49140: chore: adjust output and package.json fields
8
+ chore: 调整包的产物格式以及 packgae.json 里的字段
9
+ - e2913dd: chore: update module plugin docs and readme
10
+ chore: 更新模块插件的文档和 readme
11
+ - Updated dependencies [d19dc11]
12
+ - Updated dependencies [c890980]
13
+ - Updated dependencies [4b7488c]
14
+ - @modern-js/module-tools@2.22.0
15
+
16
+ ## 2.21.1
17
+
18
+ ### Patch Changes
19
+
20
+ - @modern-js/module-tools@2.21.1
21
+
3
22
  ## 2.21.0
4
23
 
5
24
  ### Patch Changes
package/README.md CHANGED
@@ -6,12 +6,13 @@ You can add babel compile by the plugin before module-tools internal building.
6
6
 
7
7
  ## Usage
8
8
 
9
- ```ts
10
- import { defineConfig } from '@modern-js/module-tools';
11
- import { ModulePluginBabel } from '@modern-js/plugin-module-main-fields';
9
+ ```ts modern.config.ts
10
+ import moduleTools, { defineConfig } from '@modern-js/module-tools';
11
+ import { modulePluginBabel } from '@modern-js/plugin-module-babel';
12
12
  export default defineConfig({
13
13
  plugins: [
14
- ModulePluginBabel({
14
+ moduleTools(),
15
+ modulePluginBabel({
15
16
  internalPresetOptions: {
16
17
  // babel-plugin-import options
17
18
  import: {},
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kCAA4B;AAOrB,IAAM,oBAAoB,CAC/B,aAC4B;AAAA,EAC5B,MAAM;AAAA,EACN,OAAO,OAAO;AAAA,IACZ,cAAc,QAAQ;AAb1B;AAcM,mBAAO,YAAP,mBAAgB,YAAQ,yCAAY,4BAAW,CAAC,CAAC;AACjD,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { CliPlugin, ModuleTools } from '@modern-js/module-tools';\nimport { babelPlugin } from '@modern-js/libuild-plugin-babel';\n\nexport type Options = typeof babelPlugin extends (arg1: infer P) => void\n ? P\n : never;\n\n// deprecated export name\nexport const ModulePluginBabel = (\n options?: Options,\n): CliPlugin<ModuleTools> => ({\n name: 'babel-plugin',\n setup: () => ({\n modifyLibuild(config) {\n config.plugins?.unshift(babelPlugin(options ?? {}));\n return config;\n },\n }),\n});\n\n// right export name\nexport { ModulePluginBabel as modulePluginBabel };\n"]}
1
+ {"version":3,"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kCAA4B;AAOrB,IAAM,oBAAoB,CAC/B,aAC4B;AAAA,EAC5B,MAAM;AAAA,EACN,OAAO,OAAO;AAAA,IACZ,cAAc,QAAQ;AAb1B;AAcM,mBAAO,YAAP,mBAAgB,YAAQ,yCAAY,4BAAW,CAAC,CAAC;AACjD,aAAO;AAAA,IACT;AAAA,EACF;AACF;","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { CliPlugin, ModuleTools } from '@modern-js/module-tools';\nimport { babelPlugin } from '@modern-js/libuild-plugin-babel';\n\nexport type Options = typeof babelPlugin extends (arg1: infer P) => void\n ? P\n : never;\n\n// deprecated named export\nexport const ModulePluginBabel = (\n options?: Options,\n): CliPlugin<ModuleTools> => ({\n name: 'babel-plugin',\n setup: () => ({\n modifyLibuild(config) {\n config.plugins?.unshift(babelPlugin(options ?? {}));\n return config;\n },\n }),\n});\n\n// right named export\nexport { ModulePluginBabel as modulePluginBabel };\n"]}
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.21.0",
18
+ "version": "2.22.0",
19
19
  "types": "./dist/index.d.ts",
20
20
  "main": "./dist/index.js",
21
21
  "dependencies": {
@@ -26,12 +26,12 @@
26
26
  "@types/node": "^14",
27
27
  "typescript": "^5",
28
28
  "jest": "^29",
29
- "@scripts/jest-config": "2.21.0",
30
- "@modern-js/module-tools": "2.21.0",
31
- "@scripts/build": "2.21.0"
29
+ "@scripts/jest-config": "2.22.0",
30
+ "@scripts/build": "2.22.0",
31
+ "@modern-js/module-tools": "2.22.0"
32
32
  },
33
33
  "peerDependencies": {
34
- "@modern-js/module-tools": "^2.21.0"
34
+ "@modern-js/module-tools": "^2.22.0"
35
35
  },
36
36
  "sideEffects": false,
37
37
  "publishConfig": {