-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Support different configuration languages #2879
Comments
This would be super useful. In a typescript example, all the developer would have to do is ensure they had something like |
Hey folks. This is a saved-form message, but rest assured we mean every word. The Rollup team is attempting to clean up the Issues backlog in the hopes that the active and still-needed, still-relevant issues bubble up to the surface. With that, we're closing issues that have been open for an eon or two, and have gone stale like pirate hard-tack without activity. We really appreciate the folks have taken the time to open and comment on this issue. Please don't confuse this closure with us not caring or dismissing your issue, feature request, discussion, or report. The issue will still be here, just in a closed state. If the issue pertains to a bug, please re-test for the bug on the latest version of Rollup and if present, please tag @shellscape and request a re-open, and we'll be happy to oblige. |
@shellscape re-open |
an editor-only work-around: https://stackoverflow.com/a/57330838 /** @type {import('rollup').RollupOptions} */
const options = {
...
};
export default options; Some repositories do have the |
So there are few ways around this. "r:script": "ts-node rollup.config.ts", where "ts-node": {
"compilerOptions": {
"module": "CommonJS",
"target": "ES5",
"esModuleInterop": true,
"importHelpers": true,
"resolveJsonModule": true,
"noImplicitAny": false, // Needed for plugins
"noImplicitReturns": false, // Fix later
}
}, The other approach is to make a require('ts-node').register({
compilerOptions: {
module: "CommonJS",
target: "ES5",
esModuleInterop: true,
importHelpers: true,
resolveJsonModule: true,
noImplicitAny: false, // Needed for plugins
noImplicitReturns: false, // Fix later
},
// and other tsconfig.json options as you like
});
module.exports = require('./rollup.config.ts'); I wish there was to use the |
@dvkndn |
ICYMI: #3835 |
Feature Use Case
Supporting other configuration languages can improve developer flow. For example, implementing a typescript configuration flow will allow for static typing of the config itself and provide inline errors in VSCode and other editors before the developer even runs the build.
Feature Proposal
Implement something similar to Webpack's supported configuration languages. Based on the documentation they are using interpret to translate the configs from all the other languages back into javascript.
The text was updated successfully, but these errors were encountered: