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

Add cacheDirectory support for babel-loader. (#487)

This will improve the initial babel compilation
specially for larger projects.
This commit is contained in:
Arunoda Susiripala 2016-12-23 06:19:29 +05:30 committed by Naoyuki Kanezawa
parent f6ece560e4
commit f7b9cb009f

View file

@ -86,6 +86,7 @@ export default async function createCompiler (dir, { dev = false, quiet = false
let mainBabelOptions = {
babelrc: false,
cacheDirectory: true,
sourceMaps: dev ? 'both' : false,
presets: [
require.resolve('./babel/preset')
@ -127,6 +128,7 @@ export default async function createCompiler (dir, { dev = false, quiet = false
include: nextPagesDir,
query: {
babelrc: false,
cacheDirectory: true,
sourceMaps: dev ? 'both' : false,
plugins: [
[