Skip to content

mmalinin/rolldown_custom_cli_args

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal example of custom cli arguments not being handled by rolldown. Rollup supports exporting function to handle custom command line args (https://rollupjs.org/command-line-interface/#configuration-files, search for export default commandLineArgs):

export default (commandLineArgs) => {
    console.log(commandLineArgs, typeof commandLineArgs);
    return <...>;
};

CLI command: rollup -c rollup.config.js --configLogLevel=silent --config_my_arg execution completes succesfully:

> rollup -c rollup.config.js --configLogLevel=silent --config_my_arg

{
  _: [],
  c: 'rollup.config.js',
  config: 'rollup.config.js',
  configLogLevel: 'silent',
  config_my_arg: true
} object
src/index.js → dist/bundle.js...

CLI command: rolldown -c rollup.config.js --configLogLevel=silent --config_my_arg build termiantes:

> [email protected] build:rolldown
> rolldown -c rollup.config.js --configLogLevel=silent --config_my_arg


 ERROR  Invalid option: --configLogLevel. We will ignore this option.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published