forked from sinonjs/sinon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial attempt at fixing sinonjs#1805
See sinonjs#1805 Not functional bundle. Gets this error: $ node -r esm -e 'import sinon from ./bundle-esm' file:///home/carlerik/dev/sinon/bundle-esm.js:1 import typeDetect from 'type-detect'; SyntaxError: Missing export 'default' in ES module: file:///home/carlerik/dev/sinon/node_modules/diff/lib/index.js at Object.<anonymous> (file:///home/carlerik/dev/sinon/bundle-esm.js:1)
- Loading branch information
Showing
3 changed files
with
153 additions
and
12 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,46 @@ | ||
// rollup.config.js | ||
import commonjs from "rollup-plugin-commonjs"; | ||
//import nodeResolve from "rollup-plugin-node-resolve"; | ||
|
||
export default { | ||
input: "./lib/sinon.js", | ||
output: { | ||
file: "pkg/bundle-esm.js", | ||
format: "esm" | ||
}, | ||
plugins: [ | ||
//nodeResolve({ | ||
//jsnext: true, | ||
//main: true | ||
//}), | ||
|
||
commonjs({ | ||
// non-CommonJS modules will be ignored, but you can also | ||
// specifically include/exclude files | ||
//include: "node_modules/**", // Default: undefined | ||
//exclude: ["node_modules/foo/**", "node_modules/bar/**"], // Default: undefined | ||
// these values can also be regular expressions | ||
// include: /node_modules/ | ||
|
||
// search for files other than .js files (must already | ||
// be transpiled by a previous plugin!) | ||
//extensions: [".js", ".coffee"], // Default: [ '.js' ] | ||
|
||
// if true then uses of `global` won't be dealt with by this plugin | ||
ignoreGlobal: false, // Default: false | ||
|
||
// if false then skip sourceMap generation for CommonJS modules | ||
sourceMap: false // Default: true | ||
|
||
// explicitly specify unresolvable named exports | ||
// (see below for more details) | ||
//namedExports: { "./module.js": ["foo", "bar"] }, // Default: undefined | ||
|
||
// sometimes you have to leave require statements | ||
// unconverted. Pass an array containing the IDs | ||
// or a `id => boolean` function. Only use this | ||
// option if you know what you're doing! | ||
//ignore: ["conditional-runtime-dependency"] | ||
}) | ||
] | ||
}; |