Skip to content

Commit

Permalink
fix: downgrade rollup to fix ES module bundling
Browse files Browse the repository at this point in the history
  • Loading branch information
velveteer committed Jul 19, 2018
1 parent 4b4f9a6 commit 6c05b40
Show file tree
Hide file tree
Showing 4 changed files with 151 additions and 23 deletions.
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module.exports = function karmaConfig(config) {
},
electron: {
base: 'Electron',
flags: ['--show'],
// flags: ['--show'],
},
},
browsers: process.env.CI ? [
Expand Down
159 changes: 141 additions & 18 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"fs-jetpack": "^1.2.0",
"gh-pages": "^1.2.0",
"gulp": "^3.9.1",
"gulp-better-rollup": "^3.3.0",
"gulp-better-rollup": "3.1.0",
"gulp-rename": "^1.3.0",
"gulp-replace": "^0.6.1",
"gulp-rollup": "^2.16.2",
Expand All @@ -86,7 +86,7 @@
"mocha": "^5.2.0",
"nyc": "^12.0.2",
"opn-cli": "^3.1.0",
"rollup": "^0.62.0",
"rollup": "^0.57.0",
"rollup-plugin-alias": "^1.4.0",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-node-builtins": "^2.1.2",
Expand Down
9 changes: 7 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,26 @@ const namedExports = {

const plugins = [
alias(adapters),
builtins(),
nodeResolve({
browser: true,
preferBuiltins: true,
}),
commonjs({
include: 'node_modules/**',
namedExports: namedExports,
}),
globals(),
replace({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'process.env.TEST_ENV': JSON.stringify(process.env.TEST_ENV),
}),
];

// We use Node style testing so the Karma bundle needs some Node globals
if (process.env.TEST_ENV) {
plugins.push(builtins());
plugins.push(globals());
}

module.exports = {
input: 'build/module/index.js',
onwarn: function(warning) {
Expand Down

0 comments on commit 6c05b40

Please sign in to comment.