Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(commonjs): Always sort node-resolve plugin after commonjs if it iβ¦
β¦s not the case
- Loading branch information
1 parent
f306907
commit 8d56097
Showing
8 changed files
with
149 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
packages/commonjs/test/fixtures/function/strict-requires-entry-node-resolve/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const assert = require('assert'); | ||
|
||
const { nodeResolve } = require('@rollup/plugin-node-resolve'); | ||
|
||
module.exports = { | ||
description: | ||
'strict require semantic modules can be entry points when the node-resolve plugin is used', | ||
pluginOptions: { | ||
strictRequires: true | ||
}, | ||
options: { | ||
plugins: [ | ||
{ | ||
name: 'before-node', | ||
buildStart({ plugins }) { | ||
assert.deepStrictEqual( | ||
plugins.map((plugin) => plugin.name), | ||
['before-node', 'after-node', 'commonjs', 'node-resolve'] | ||
); | ||
} | ||
}, | ||
nodeResolve(), | ||
{ | ||
name: 'after-node' | ||
} | ||
] | ||
}, | ||
exports(exports) { | ||
assert.deepStrictEqual(exports, { foo: 'foo' }); | ||
} | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
packages/commonjs/test/fixtures/function/strict-requires-multiple-entry/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
exports.foo = 'foo'; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.