GitXplorerGitXplorer
e

webpack-rollup-loader

public
46 stars
3 forks
4 issues

Commits

List of commits on branch master.
Verified
d747db7878d37ad53436929db8b0a3abff89844d

Merge pull request #27 from erikdesjardins/rollup2

eerikdesjardins committed 3 years ago
Unverified
7b8766fcbd31b13aecb1457de2fca379e2a51ef8

0.8.1

eerikdesjardins committed 3 years ago
Unverified
b1007634b6d3996566dfe3802188f3d40e05c09c

update deps, indicate support for rollup 2

eerikdesjardins committed 3 years ago
Verified
c161135d78aa6b997bf93b47abf8ad2308dd9ff4

Merge pull request #26 from erikdesjardins/ghact

eerikdesjardins committed 5 years ago
Unverified
0aaaa8a7b47e555c35435605c8e2cfd0aec28055

use github actions, update devdeps

eerikdesjardins committed 5 years ago
Verified
10fb020f997a146725963b202d79290c8798a7a0

Merge pull request #23 from erikdesjardins/updates

eerikdesjardins committed 6 years ago

README

The README file for this repository.

webpack-rollup-loader

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
      }
    ]
  }
};