Skip to content
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris committed Aug 28, 2017
1 parent 2b13f7b commit 29fc2ca
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ npm install --save-dev rollup-plugin-node-resolve

```js
// rollup.config.js
import { rollup } from 'rollup';
import resolve from 'rollup-plugin-node-resolve';

export default {
entry: 'main.js',
dest: 'bundle.js',
moduleName: 'MyModule',
format: 'iife',
input: 'main.js',
output: {
file: 'bundle.js',
format: 'iife'
},
name: 'MyModule',
plugins: [
resolve({
// use "module" field for ES6 module if possible
Expand Down Expand Up @@ -73,17 +74,18 @@ Since most packages in your node_modules folder are probably legacy CommonJS rat

```js
// rollup.config.js
import { rollup } from 'rollup';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';

export default {
entry: 'main.js',
dest: 'bundle.js',
moduleName: 'MyModule',
format: 'iife',
input: 'main.js',
output: {
file: 'bundle.js',
format: 'iife'
},
name: 'MyModule',
plugins: [
resolve({ jsnext: true, main: true }),
resolve(),
commonjs()
]
};
Expand Down

0 comments on commit 29fc2ca

Please sign in to comment.