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

Commit

Permalink
docs: document new mainFields option
Browse files Browse the repository at this point in the history
  • Loading branch information
keithamus committed Sep 27, 2018
1 parent 462f6d1 commit 59a6bea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -25,20 +25,28 @@ export default {
name: 'MyModule',
plugins: [
resolve({

// the fields to scan in a package.json to determine the entry point..
mainFields: ['module', 'main'], // Default: ['module', 'main']

// DEPRECATED: use `mainFields` instead
// use "module" field for ES6 module if possible
module: true, // Default: true

// DEPRECATED: use `mainFields` instead
// use "jsnext:main" if possible
// legacy field pointing to ES6 module in third-party libraries,
// deprecated in favor of "pkg.module":
// - see: https://github.com/rollup/rollup/wiki/pkg.module
jsnext: true, // Default: false

// DEPRECATED: use `mainFields` instead
// use "main" field or index.js, even if it's not an ES6 module
// (needs to be converted from CommonJS to ES6
// – see https://github.com/rollup/rollup-plugin-commonjs
main: true, // Default: true

// DEPRECATED: use `mainFields` instead
// some package.json files have a `browser` field which
// specifies alternative files to load for people bundling
// for the browser. If that's you, use this option, otherwise
Expand Down

0 comments on commit 59a6bea

Please sign in to comment.