Skip to content

Commit

Permalink
Fix hot reloading with multiple transpiled modules
Browse files Browse the repository at this point in the history
  • Loading branch information
martpie committed Oct 16, 2018
1 parent 19122da commit 958472c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ function regexEqual(x, y) {
module.exports = (nextConfig = {}) => {

const { transpileModules = [] } = nextConfig
const includes = transpileModules.map(module => (new RegExp(`${module}(?!.*node_modules)`)))
const excludes = transpileModules.map(module => (new RegExp(`node_modules(?!\/${module}(?!.*node_modules))`)))
const includes = transpileModules.map(module => (new RegExp(`${module}(?!.*node_modules)`)));
const excludes = [new RegExp(`node_modules(?!\/(${transpileModules.join('|')})(?!.*node_modules))`)];

return Object.assign({}, nextConfig, {
webpack(config, options) {
Expand Down

0 comments on commit 958472c

Please sign in to comment.