Skip to content

Commit 70c5e56

Browse files
committed
Set exports field for "uui" package to enforce correct usage
1 parent 9de1c9e commit 70c5e56

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/uui/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@
2323
"main": "./dist/uui.min.js",
2424
"module": "./lib/index.js",
2525
"types": "./lib/index.d.ts",
26+
"type": "module",
27+
"exports": {
28+
"import": "./lib/index.js",
29+
"require": "./dist/uui.min.js"
30+
},
2631
"customElements": "custom-elements.json",
2732
"files": [
2833
"dist",
@@ -90,9 +95,9 @@
9095
"@umbraco-ui/uui-toggle": "0.0.17"
9196
},
9297
"scripts": {
93-
"build": "npm run analyze && tsc --build --force && rollup -c rollup.config.js",
98+
"build": "npm run analyze && tsc --build && rollup -c rollup.config.js",
9499
"clean": "tsc --build --clean && rimraf dist lib/*.js lib/**/*.js custom-elements.json",
95-
"analyze": "web-component-analyzer **/*.element.ts --outFile custom-elements.json"
100+
"analyze": "web-component-analyzer lib/index.ts --outFile custom-elements.json"
96101
},
97102
"publishConfig": {
98103
"access": "public"

0 commit comments

Comments
 (0)