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:
parent
f6ece560e4
commit
f7b9cb009f
|
@ -86,6 +86,7 @@ export default async function createCompiler (dir, { dev = false, quiet = false
|
||||||
|
|
||||||
let mainBabelOptions = {
|
let mainBabelOptions = {
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
|
cacheDirectory: true,
|
||||||
sourceMaps: dev ? 'both' : false,
|
sourceMaps: dev ? 'both' : false,
|
||||||
presets: [
|
presets: [
|
||||||
require.resolve('./babel/preset')
|
require.resolve('./babel/preset')
|
||||||
|
@ -127,6 +128,7 @@ export default async function createCompiler (dir, { dev = false, quiet = false
|
||||||
include: nextPagesDir,
|
include: nextPagesDir,
|
||||||
query: {
|
query: {
|
||||||
babelrc: false,
|
babelrc: false,
|
||||||
|
cacheDirectory: true,
|
||||||
sourceMaps: dev ? 'both' : false,
|
sourceMaps: dev ? 'both' : false,
|
||||||
plugins: [
|
plugins: [
|
||||||
[
|
[
|
||||||
|
|
Loading…
Reference in a new issue