Rollup Plugin Lux
Lux uses Babel
and Rollup to bundle applications into a
single file to make module loading and resolution a bit easier. However, this
method does not guarantee that the value of constructor.name
will be the same
in the bundled output. This plugin allow's Lux
to continue to use this method to resolve dependencies of an application by
appending an Object.defineProperty
call below each constructor that sub classes
a member of the public Lux API.
Note:
This is a module that Lux uses internally. It is not required for users of Lux to add this plugin to their
package.json
file.
Example
Before
; ;
After
; ; Object;
Installation
git clone https://github.com/postlight/rollup-plugin-lux.gitcd rollup-plugin-luxnpm install
Testing
npm test
Building
npm run build