mirror of https://github.com/lukechilds/rollup.git
Rich-Harris
9 years ago
10 changed files with 179 additions and 0 deletions
@ -0,0 +1,6 @@ |
|||
module.exports = { |
|||
description: 'dedupes external imports', |
|||
options: { |
|||
external: [ 'external' ] |
|||
} |
|||
}; |
@ -0,0 +1,28 @@ |
|||
define(['external'], function (external) { 'use strict'; |
|||
|
|||
class Foo extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isFoo = true; |
|||
} |
|||
} |
|||
|
|||
class Bar extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBar = true; |
|||
} |
|||
} |
|||
|
|||
class Baz extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBaz = true; |
|||
} |
|||
} |
|||
|
|||
const foo = new Foo(); |
|||
const bar = new Bar(); |
|||
const baz = new Baz(); |
|||
|
|||
}); |
@ -0,0 +1,28 @@ |
|||
'use strict'; |
|||
|
|||
var external = require('external'); |
|||
|
|||
class Foo extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isFoo = true; |
|||
} |
|||
} |
|||
|
|||
class Bar extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBar = true; |
|||
} |
|||
} |
|||
|
|||
class Baz extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBaz = true; |
|||
} |
|||
} |
|||
|
|||
const foo = new Foo(); |
|||
const bar = new Bar(); |
|||
const baz = new Baz(); |
@ -0,0 +1,26 @@ |
|||
import { Component } from 'external'; |
|||
|
|||
class Foo extends Component { |
|||
constructor () { |
|||
super(); |
|||
this.isFoo = true; |
|||
} |
|||
} |
|||
|
|||
class Bar extends Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBar = true; |
|||
} |
|||
} |
|||
|
|||
class Baz extends Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBaz = true; |
|||
} |
|||
} |
|||
|
|||
const foo = new Foo(); |
|||
const bar = new Bar(); |
|||
const baz = new Baz(); |
@ -0,0 +1,28 @@ |
|||
(function (external) { 'use strict'; |
|||
|
|||
class Foo extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isFoo = true; |
|||
} |
|||
} |
|||
|
|||
class Bar extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBar = true; |
|||
} |
|||
} |
|||
|
|||
class Baz extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBaz = true; |
|||
} |
|||
} |
|||
|
|||
const foo = new Foo(); |
|||
const bar = new Bar(); |
|||
const baz = new Baz(); |
|||
|
|||
})(external); |
@ -0,0 +1,32 @@ |
|||
(function (global, factory) { |
|||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('external')) : |
|||
typeof define === 'function' && define.amd ? define(['external'], factory) : |
|||
factory(global.external); |
|||
}(this, function (external) { 'use strict'; |
|||
|
|||
class Foo extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isFoo = true; |
|||
} |
|||
} |
|||
|
|||
class Bar extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBar = true; |
|||
} |
|||
} |
|||
|
|||
class Baz extends external.Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBaz = true; |
|||
} |
|||
} |
|||
|
|||
const foo = new Foo(); |
|||
const bar = new Bar(); |
|||
const baz = new Baz(); |
|||
|
|||
})); |
@ -0,0 +1,8 @@ |
|||
import { Component } from 'external'; |
|||
|
|||
export default class Bar extends Component { |
|||
constructor () { |
|||
super(); |
|||
this.isBar = true; |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
import { Component as Comp } from 'external'; |
|||
|
|||
export default class Baz extends Comp { |
|||
constructor () { |
|||
super(); |
|||
this.isBaz = true; |
|||
} |
|||
} |
@ -0,0 +1,8 @@ |
|||
import { Component } from 'external'; |
|||
|
|||
export default class Foo extends Component { |
|||
constructor () { |
|||
super(); |
|||
this.isFoo = true; |
|||
} |
|||
} |
@ -0,0 +1,7 @@ |
|||
import Foo from './foo'; |
|||
import Bar from './bar'; |
|||
import Baz from './baz'; |
|||
|
|||
const foo = new Foo(); |
|||
const bar = new Bar(); |
|||
const baz = new Baz(); |
Loading…
Reference in new issue