Browse Source

Update Rollup to 0.20.1

update-to-0.20.1
Oskar Segersvärd 9 years ago
parent
commit
0931e3ecdf
  1. 2
      package.json
  2. 36
      src/app/main.js

2
package.json

@ -31,6 +31,6 @@
"ractive": "^0.7.3",
"ractive-events-tap": "^0.2.0",
"ractive-transitions-slide": "^0.2.1",
"rollup": "^0.19.1"
"rollup": "^0.20.1"
}
}

36
src/app/main.js

@ -74,22 +74,26 @@ if ( supported ) {
/*global rollup */
rollup.rollup({
entry: 'main',
resolveId ( importee, importer ) {
if ( !importer ) return importee;
if ( importee[0] !== '.' ) return false;
return resolve( dirname( importer ), importee ).replace( /^\.\//, '' );
},
load: function ( id ) {
if ( id === 'main' ) return modules[0].code;
if ( extname( id ) === '' ) id += '.js';
const module = moduleById[ id ];
if ( !module ) throw new Error( `missing module ${id}` ); // TODO...
return module.code;
}
plugins: [
{
resolveId ( importee, importer ) {
if ( !importer ) return importee;
if ( importee[0] !== '.' ) return false;
return resolve( dirname( importer ), importee ).replace( /^\.\//, '' );
},
load: function ( id ) {
if ( id === 'main' ) return modules[0].code;
if ( extname( id ) === '' ) id += '.js';
const module = moduleById[ id ];
if ( !module ) throw new Error( `missing module ${id}` ); // TODO...
return module.code;
}
}
]
}).then( bundle => {
output.set({
imports: bundle.imports,

Loading…
Cancel
Save