rollup-plugin-lux

3.0.0 • Public • Published

Rollup Plugin Lux

CircleCI branch AppVeyor Codecov branch David npm

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

Readme

Keywords

none

Package Sidebar

Install

npm i rollup-plugin-lux

Weekly Downloads

1

Version

3.0.0

License

MIT

Last publish

Collaborators

  • zacharygolba