mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
8 years ago
9 changed files with 47 additions and 0 deletions
@ -0,0 +1,8 @@ |
|||
module.exports = { |
|||
description: 'allows custom module-specific context with a function option', |
|||
options: { |
|||
moduleContext ( id ) { |
|||
return /main\.js$/.test( id ) ? 'lolwut' : 'undefined'; |
|||
} |
|||
} |
|||
}; |
@ -0,0 +1,7 @@ |
|||
define(function () { 'use strict'; |
|||
|
|||
undefined.prop = 'nope'; |
|||
|
|||
lolwut.prop = '???'; |
|||
|
|||
}); |
@ -0,0 +1,5 @@ |
|||
'use strict'; |
|||
|
|||
undefined.prop = 'nope'; |
|||
|
|||
lolwut.prop = '???'; |
@ -0,0 +1,3 @@ |
|||
undefined.prop = 'nope'; |
|||
|
|||
lolwut.prop = '???'; |
@ -0,0 +1,8 @@ |
|||
(function () { |
|||
'use strict'; |
|||
|
|||
undefined.prop = 'nope'; |
|||
|
|||
lolwut.prop = '???'; |
|||
|
|||
}()); |
@ -0,0 +1,11 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
|||
typeof define === 'function' && define.amd ? define(factory) : |
|||
(factory()); |
|||
}(this, (function () { 'use strict'; |
|||
|
|||
undefined.prop = 'nope'; |
|||
|
|||
lolwut.prop = '???'; |
|||
|
|||
}))); |
@ -0,0 +1 @@ |
|||
this.prop = 'nope'; |
@ -0,0 +1,2 @@ |
|||
import './foo.js'; |
|||
this.prop = '???'; |
Loading…
Reference in new issue