webpack-rollup-loader
Webpack loader that uses Rollup, which calls back into Webpack for module resolution.
Last updated 8 months ago by erikdesjardins .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install webpack-rollup-loader 
SYNC missed versions from official npm registry.

webpack-rollup-loader Build Status

Webpack loader that uses Rollup, which calls back into Webpack for module resolution.

Inspired by egoist/rollup-loader.

Installation

npm install --save-dev webpack-rollup-loader

Rollup is a peer dependency, and must also be installed:

npm install --save-dev rollup

Usage

Note: This loader must only be applied once to the entry module. Using it to load all .js files (or just recursively) will produce incorrect code.

If you use Babel, make sure that it isn't converting ES6 imports to CommonJS.

webpack.config.js:

module.exports = {
  entry: 'entry.js',
  module: {
    rules: [
      {
        test: /entry\.js$/,
        use: [{
          loader: 'webpack-rollup-loader',
          options: {
            // OPTIONAL: any rollup options (except `entry`)
            // e.g.
            external: [/* modules that shouldn't be rollup'd */]
          },
        }]
      },

      // ...other rules as usual
      {
        test: /\.js$/,
        use: ['babel-loader'] // can be applied to .js files as usual
      }
    ]
  }
};

Current Tags

  • 0.8.0                                ...           latest (8 months ago)

15 Versions

  • 0.8.0                                ...           8 months ago
  • 0.7.1                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 9
Last Day 1
Last Week 0
Last Month 17
Dependencies (0)
None
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |