Skip to content

Commit 43d7654

Browse files
committed
Simplify exports
This also prevents the thing from overriding the source.
1 parent 6674754 commit 43d7654

File tree

4 files changed

+14
-26
lines changed

4 files changed

+14
-26
lines changed

packages/cdn-location/package.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,11 @@
77
"url": "git+https://github.com/streamr-dev/network.git",
88
"directory": "packages/cdn-location"
99
},
10-
"exports": {
11-
".": {
12-
"default": {
13-
"types": "./dist/src/exports.d.ts",
14-
"import": "./dist/src/exports.js",
15-
"require": "./dist/src/exports.cjs"
16-
}
17-
}
18-
},
10+
"main": "./dist/exports.cjs",
11+
"module": "./dist/exports.js",
12+
"types": "./dist/exports.d.ts",
1913
"files": [
20-
"dist/src/exports.*",
14+
"dist/exports.*",
2115
"!*.tsbuildinfo",
2216
"README.md",
2317
"LICENSE"

packages/cdn-location/rollup.config.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ function nodejs(): RollupOptions {
1313
output: [
1414
{
1515
format: 'es',
16-
file: './dist/src/exports.js',
16+
file: './dist/exports.js',
1717
sourcemap: true,
1818
},
1919
{
2020
format: 'cjs',
21-
file: './dist/src/exports.cjs',
21+
file: './dist/exports.cjs',
2222
sourcemap: true,
2323
},
2424
],
@@ -39,7 +39,7 @@ function nodejsTypes(): RollupOptions {
3939
input: './dist/src/exports.d.ts',
4040
output: [
4141
{
42-
file: './dist/src/exports.d.ts',
42+
file: './dist/exports.d.ts',
4343
},
4444
],
4545
plugins: [

packages/geoip-location/package.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,11 @@
77
"url": "git+https://github.com/streamr-dev/network.git",
88
"directory": "packages/geoip-location"
99
},
10-
"exports": {
11-
".": {
12-
"default": {
13-
"types": "./dist/src/exports.d.ts",
14-
"import": "./dist/src/exports.js",
15-
"require": "./dist/src/exports.cjs"
16-
}
17-
}
18-
},
10+
"main": "./dist/exports.cjs",
11+
"module": "./dist/exports.js",
12+
"types": "./dist/exports.d.ts",
1913
"files": [
20-
"dist/src/exports.*",
14+
"dist/exports.*",
2115
"!*.tsbuildinfo",
2216
"README.md",
2317
"LICENSE"

packages/geoip-location/rollup.config.mts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ function nodejs(): RollupOptions {
1313
output: [
1414
{
1515
format: 'es',
16-
file: './dist/src/exports.js',
16+
file: './dist/exports.js',
1717
sourcemap: true,
1818
},
1919
{
2020
format: 'cjs',
21-
file: './dist/src/exports.cjs',
21+
file: './dist/exports.cjs',
2222
sourcemap: true,
2323
},
2424
],
@@ -38,7 +38,7 @@ function nodejsTypes(): RollupOptions {
3838
return {
3939
input: './dist/src/exports.d.ts',
4040
output: [
41-
{ file: './dist/src/exports.d.ts' },
41+
{ file: './dist/exports.d.ts' },
4242
],
4343
plugins: [
4444
nodeResolve(),

0 commit comments

Comments
 (0)