Browse Source

provide informative error if rollup is used in browser without custom resolveId/load functions

gh-669
Rich-Harris 9 years ago
parent
commit
d99a89de57
  1. 2
      src/utils/defaults.js

2
src/utils/defaults.js

@ -16,6 +16,8 @@ function addJsExtensionIfNecessary ( file ) {
}
export function resolveId ( importee, importer ) {
if ( typeof process === 'undefined' ) throw new Error( `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` );
// absolute paths are left untouched
if ( isAbsolute( importee ) ) return addJsExtensionIfNecessary( importee );

Loading…
Cancel
Save