diff --git a/defaultRules.md b/defaultRules.md index c1b684c7..76e762d2 100644 --- a/defaultRules.md +++ b/defaultRules.md @@ -29,6 +29,7 @@ _Note: when a specific key order is used, any other keys will be sorted in the e | imports | | | exports | | | main | | +| svelte | | | umd:main | | | jsdelivr | | | unpkg | | diff --git a/index.js b/index.js index c9dfe4ad..39abc2c5 100755 --- a/index.js +++ b/index.js @@ -215,6 +215,7 @@ const fields = [ { key: 'imports' }, { key: 'exports' }, { key: 'main' }, + { key: 'svelte' }, { key: 'umd:main' }, { key: 'jsdelivr' }, { key: 'unpkg' }, diff --git a/tests/fields.js b/tests/fields.js index 6c5ae04d..4edd4871 100644 --- a/tests/fields.js +++ b/tests/fields.js @@ -15,6 +15,7 @@ for (const field of [ 'publisher', 'type', 'main', + 'svelte', 'umd:main', 'jsdelivr', 'unpkg', diff --git a/tests/snapshots/main.js.md b/tests/snapshots/main.js.md index 020e0f29..6020033c 100644 --- a/tests/snapshots/main.js.md +++ b/tests/snapshots/main.js.md @@ -99,6 +99,7 @@ Generated by [AVA](https://avajs.dev). "source": "source",␊ "style": "style",␊ "stylelint": "stylelint",␊ + "svelte": "svelte",␊ "tap": "tap",␊ "type": "type",␊ "types": "types",␊ @@ -136,6 +137,7 @@ Generated by [AVA](https://avajs.dev). "imports": "imports",␊ "exports": "exports",␊ "main": "main",␊ + "svelte": "svelte",␊ "umd:main": "umd:main",␊ "jsdelivr": "jsdelivr",␊ "unpkg": "unpkg",␊ diff --git a/tests/snapshots/main.js.snap b/tests/snapshots/main.js.snap index e16a541b..e84a37c3 100644 Binary files a/tests/snapshots/main.js.snap and b/tests/snapshots/main.js.snap differ