Skip to content

Commit

Permalink
refine exports and browser field interaction
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred de Beer authored and Jarred de Beer committed Apr 23, 2021
1 parent 98b6991 commit 5849074
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
12 changes: 1 addition & 11 deletions packages/node-resolve/test/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,17 +200,7 @@ test('pkg.browser with mapping to prevent bundle by specifying a value of false'
t.is(module.exports, 'ok');
});

test('pkg.browser can override the export map result', async (t) => {
const bundle = await rollup({
input: 'browser-override-exports.js',
plugins: [nodeResolve({ browser: true }), commonjs()]
});
const { module } = await testBundle(t, bundle);

t.is(module.exports, 'browser');
});

test('pkg.browser can be mapped via exports.browser', async (t) => {
test('exports.browser can be mapped via pkg.browser', async (t) => {
const bundle = await rollup({
input: 'browser-exports-browser-browser.js',
plugins: [nodeResolve({ browser: true }), commonjs()]
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5849074

Please sign in to comment.