rollup-plugin-lux
v3.0.0
Published
A Rollup plugin for bundling Lux applications.
Downloads
8
Readme
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
import { Model } from 'lux-framework';
class User extends Model {
}
export default User;
After
import { Model } from 'lux-framework';
class User extends Model {
}
export default User;
Object.defineProperty(User, 'name', { name: 'User' });
Installation
git clone https://github.com/postlight/rollup-plugin-lux.git
cd rollup-plugin-lux
npm install
Testing
npm test
Building
npm run build