stderr(chalk.red('rollup can only bundle one file at a time'));
},
DUPLICATE_IMPORT_OPTIONS:()=>{
stderr(chalk.red('use --input, or pass input path as argument'));
},
ROLLUP_WATCH_NOT_INSTALLED:()=>{
stderr(chalk.red('rollup --watch depends on the rollup-watch package, which could not be found. Install it with ')+chalk.cyan('npm install -D rollup-watch'));
},
WATCHER_MISSING_INPUT_OR_OUTPUT:()=>{
stderr(chalk.red('must specify --input and --output when using rollup --watch'));
}
};
exportdefaultfunctionhandleError(err,recover){
consthandler=handlers[err&&err.code];
if(handler){
handler(err);
}else{
stderr(chalk.red(err.message||err));
if(err.stack){
stderr(chalk.grey(err.stack));
}
}
stderr(`Type ${chalk.cyan('rollup --help')} for help, or visit https://github.com/rollup/rollup/wiki`);
message:`'${importDeclaration.name}' is not exported by ${relativeId(otherModule.id)} (imported by ${relativeId(this.id)}). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module`,
code:'MISSING_EXPORT',
file:this.id,
message:`'${importDeclaration.name}' is not exported by ${relativeId(otherModule.id)}`,
@ -50,15 +51,15 @@ function checkOptions ( options ) {
returnnewError('The `transform`, `load`, `resolveId` and `resolveExternal` options are deprecated in favour of a unified plugin API. See https://github.com/rollup/rollup/wiki/Plugins for details');
returnnewError('The `transform`, `load`, `resolveId` and `resolveExternal` options are deprecated in favour of a unified plugin API. See https://github.com/rollup/rollup/wiki/Plugins for details');
@ -27,7 +28,13 @@ function addJsExtensionIfNecessary ( file ) {
}
}
exportfunctionresolveId(importee,importer){
exportfunctionresolveId(importee,importer){
if(typeofprocess==='undefined')thrownewError(`It looks like you're using Rollup in a non-Node.js environment. This means you must supply a plugin with custom resolveId and load functions. See https://github.com/rollup/rollup/wiki/Plugins for more information`);
if(typeofprocess==='undefined'){
error({
code:'MISSING_PROCESS',
message:`It looks like you're using Rollup in a non-Node.js environment. This means you must supply a plugin with custom resolveId and load functions`,
description:'default export is not re-exported with export *',
description:'default export is not re-exported with export *',
error(error){
error:{
assert.equal(error.message,`'default' is not exported by foo.js (imported by main.js). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module`);
description:'marking an imported, but unexported, identifier should throw',
description:'marking an imported, but unexported, identifier should throw',
error:function(err){
error:{
assert.equal(err.message,`'default' is not exported by empty.js (imported by main.js). For help fixing this error see https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module`);