1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Allow the pages directory to be in node_modules (#318)

This commit is contained in:
Frederick Fogerty 2016-12-02 00:30:36 +13:00 committed by Naoyuki Kanezawa
parent 7a66870af9
commit a13c6ccb11

View file

@ -113,7 +113,7 @@ export default async function createCompiler (dir, { hotReload = false, dev = fa
loader: 'babel', loader: 'babel',
include: [dir, nextPagesDir], include: [dir, nextPagesDir],
exclude (str) { exclude (str) {
return /node_modules/.test(str) && str.indexOf(nextPagesDir) !== 0 return /node_modules/.test(str) && str.indexOf(nextPagesDir) !== 0 && str.indexOf(dir) !== 0
}, },
query: { query: {
presets: ['es2015', 'react'], presets: ['es2015', 'react'],