Skip to content

Commit

Permalink
hack to prevent tests from failing (error with firebase see firebase/…
Browse files Browse the repository at this point in the history
  • Loading branch information
FaXaq committed Mar 24, 2019
1 parent 091095c commit 2d4fe64
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions vue.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// hack to prevent tests from failing with firebase build
const regex = /firebase\/(app|firestore)/;

module.exports = {
configureWebpack: {
externals: ['/node_modules/', function(context, request, callback) {

// exclude firebase products from being bundled, so they will be loaded using require() at runtime.
if(regex.test(request)) {
return callback(null, 'commonjs ' + request);
}
callback();
}]
}
}

0 comments on commit 2d4fe64

Please sign in to comment.