Skip to content

Commit 71f500b

Browse files
authored
fix(analytics): package.json fields export (#2663)
Signed-off-by: protobuf-ci-cd <[email protected]>
1 parent 17ac0e6 commit 71f500b

File tree

3 files changed

+20
-2
lines changed

3 files changed

+20
-2
lines changed

.changeset/tangy-tires-warn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@scaleway/use-analytics": patch
3+
---
4+
5+
fix export fields

packages/use-analytics/package.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,21 @@
99
"type": "module",
1010
"exports": {
1111
".": {
12+
"types": "./dist/index.d.ts",
13+
"require": "./dist/index.cjs",
14+
"import": "./dist/index.js",
15+
"default": "./dist/index.js"
16+
},
17+
"./analytics": {
1218
"types": "./dist/analytics/index.d.ts",
1319
"require": "./dist/analytics/index.cjs",
20+
"import": "./dist/analytics/index.js",
1421
"default": "./dist/analytics/index.js"
1522
},
1623
"./cookies-consent": {
1724
"types": "./dist/cookies-consent/index.d.ts",
1825
"require": "./dist/cookies-consent/index.cjs",
26+
"import": "./dist/cookies-consent/index.js",
1927
"default": "./dist/cookies-consent/index.js"
2028
}
2129
},
@@ -31,7 +39,8 @@
3139
"type:generate": "tsc --declaration -p tsconfig.build.json",
3240
"build": "vite build --config vite.config.ts && pnpm run type:generate",
3341
"build:profile": "npx vite-bundle-visualizer -c vite.config.ts",
34-
"lint": "eslint --report-unused-disable-directives --cache --cache-strategy content --ext ts,tsx ."
42+
"lint": "eslint --report-unused-disable-directives --cache --cache-strategy content --ext ts,tsx .",
43+
"lintpublish": "publint"
3544
},
3645
"repository": {
3746
"type": "git",

packages/use-analytics/vite.config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ export default mergeConfig(config, {
1111
build: {
1212
lib: {
1313
formats: ['es', 'cjs'],
14-
entry: ['src/index.ts', 'src/cookies-consent/index.ts'],
14+
entry: [
15+
'src/index.ts',
16+
'src/analytics/index.ts',
17+
'src/cookies-consent/index.ts',
18+
],
1519
},
1620
},
1721
test: {

0 commit comments

Comments
 (0)