ember-cli-rollup-packager

0.4.1 • Public • Published

ember-cli-rollup-packager

npm version Build Status Build status

Rollup.js packager for Ember CLI

Prerequisites

Make sure your app works with ember-cli master first.

Installation

npm install --save-dev ember-cli-rollup-packager kellyselden/ember-cli#content-funnel cross-env

Usage

// ember-cli-build.js
const rollupPackager = require('ember-cli-rollup-packager');
 
module.exports = function(defaults) {
  let app = new EmberApp(defaults, {
    package: rollupPackager({
      // options
    })
  });
 
  return app.toTree();
};
// package.json
{
  "scripts": {
    "packager": "cross-env EMBER_CLI_PACKAGER=true EMBER_CLI_DELAYED_TRANSPILATION=true",
    "prebuild": "npm run packager",
    "prestart": "npm run packager",
    "pretest": "npm run packager"
  }
}

Options

Option Description Type Examples Default
useNodeModules Search node_modules for imported modules. This is not on by default because shims can be mistaken for real modules. See option externalImports for more info. boolean false
additionalEntryPoints Prevent non-standard Ember code from being ejected. Some addons have their own conventions that you need to manually enter in. Array of Strings ['app-tree-output/custom-file.js'] []
includeEntireAppTree Include all non-standard Ember code from the "app" folder. This may be easier than using additionalEntryPoints, but eliminates some tree-shaking of the app. boolean false
externalImports Mark shims as external. This suppresses warnings and prevents a different module with the same name from being found in node_modules. Array of Strings ['pretender'] []
additionalRollupInputOptions Supply additional input options to affect the Rollup output. Object { treeshake: { pureExternalModules: true } } {}

Readme

Keywords

Package Sidebar

Install

npm i ember-cli-rollup-packager

Weekly Downloads

9

Version

0.4.1

License

MIT

Unpacked Size

24.6 kB

Total Files

7

Last publish

Collaborators

  • kellyselden