From 59a6beaa1c612907e3a7de2e2ba2185f683cd521 Mon Sep 17 00:00:00 2001 From: Keith Cirkel Date: Thu, 27 Sep 2018 12:20:32 +0100 Subject: [PATCH] docs: document new mainFields option --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 51d307c..25427f5 100644 --- a/README.md +++ b/README.md @@ -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