Skip to content

Commit 778d619

Browse files
fix(package): use package values relative to dist (#123)
This corrects an issue where types weren't found because the installed package has "dist" at the root level. Entry points were also adjusted in the same fashion, while the rollup configuration was updated to create these files in "dist".
1 parent 7a0ea84 commit 778d619

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "typescript-monads",
33
"version": "0.0.0-development",
44
"description": "Write cleaner TypeScript",
5-
"main": "dist/index.js",
6-
"module": "dist/index.esm.js",
7-
"commonJs": "dist/index.cjs.js",
8-
"typings": "dist/types/index.d.ts",
5+
"main": "index.js",
6+
"module": "index.esm.js",
7+
"commonJs": "index.cjs.js",
8+
"typings": "types/index.d.ts",
99
"sideEffects": false,
1010
"author": "Patrick Michalina <[email protected]> (https://patrickmichalina.com)",
1111
"license": "MIT",

rollup.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ export default [
66
input: 'dist/lib/index.js',
77
output: {
88
name: 'monads',
9-
file: pkg.main,
9+
file: `dist/${pkg.main}`,
1010
format: 'umd',
1111
sourcemap: true
1212
},
1313
},
1414
{
1515
input: 'src/index.ts',
1616
output: [
17-
{ file: pkg.module, format: 'es', sourcemap: true },
18-
{ file: pkg.commonJs, format: 'cjs', sourcemap: true }
17+
{ file: `dist/${pkg.module}`, format: 'es', sourcemap: true },
18+
{ file: `dist/${pkg.commonJs}`, format: 'cjs', sourcemap: true }
1919
],
2020
plugins: [typescript()]
2121
}]

0 commit comments

Comments
 (0)