-
Notifications
You must be signed in to change notification settings - Fork 1
Fixing some issues with rollup #57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -32,7 +32,7 @@ | |||
}, | |||
"devDependencies": { | |||
"@rollup/plugin-commonjs": "^28.0.2", | |||
"@rollup/plugin-node-resolve": "^16.0.0", | |||
"@rollup/plugin-node-resolve": "^16.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this wasn't being used which led to a warning about
(!) Unresolved dependencies
https://rollupjs.org/troubleshooting/#warning-treating-module-as-external-dependency
stream (imported by "dist/main/RestClient.d.ts")
@@ -12,13 +13,13 @@ export default [ | |||
{ file: pkg.main, format: 'cjs', sourcemap: true }, | |||
{ file: pkg.module, format: 'esm', sourcemap: true }, | |||
], | |||
plugins: [typescript({ tsconfig: './tsconfig.json' })], | |||
plugins: [nodeResolve({ preferBuiltins: true }), typescript({ tsconfig: './tsconfig.json', noEmitOnError: true })], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing noEmitOnError
led to rollup building even if there were type errors
74f6654
to
8b72585
Compare
@@ -6,7 +6,8 @@ | |||
"outDir": "./dist", | |||
"declarationDir": "./dist", | |||
"resolveJsonModule": true, | |||
"sourceMap": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rollup was complaining about module needing to be set to Node16
:
(!) [plugin typescript] @rollup/plugin-typescript TS5110: Option 'module' must be set to 'Node16' when option 'moduleResolution' is set to 'Node16'.
This didn't make sense as we had a chain of extends going to @tsconfig/node22/tsconfig.json
which sets it there.
This was preventing typechecking entirely
Looks like there's a bug where extending doesn't work for modules
65cbb27
to
aeb9b15
Compare
aeb9b15
to
5fafa0d
Compare
No description provided.