mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Use fs.realpath to get actual project directory (#3243)
* resolve base dir symlink * fix method name
This commit is contained in:
parent
6952d58c4e
commit
828dac7d61
|
@ -1,5 +1,6 @@
|
||||||
import { resolve, join, sep } from 'path'
|
import { resolve, join, sep } from 'path'
|
||||||
import { createHash } from 'crypto'
|
import { createHash } from 'crypto'
|
||||||
|
import { realpathSync } from 'fs'
|
||||||
import webpack from 'webpack'
|
import webpack from 'webpack'
|
||||||
import glob from 'glob-promise'
|
import glob from 'glob-promise'
|
||||||
import WriteFilePlugin from 'write-file-webpack-plugin'
|
import WriteFilePlugin from 'write-file-webpack-plugin'
|
||||||
|
@ -28,7 +29,7 @@ const interpolateNames = new Map(defaultPages.map((p) => {
|
||||||
const relativeResolve = rootModuleRelativePath(require)
|
const relativeResolve = rootModuleRelativePath(require)
|
||||||
|
|
||||||
export default async function createCompiler (dir, { buildId, dev = false, quiet = false, buildDir, conf = null } = {}) {
|
export default async function createCompiler (dir, { buildId, dev = false, quiet = false, buildDir, conf = null } = {}) {
|
||||||
dir = resolve(dir)
|
dir = realpathSync(resolve(dir))
|
||||||
const config = getConfig(dir, conf)
|
const config = getConfig(dir, conf)
|
||||||
const defaultEntries = dev ? [
|
const defaultEntries = dev ? [
|
||||||
join(__dirname, '..', '..', 'client', 'webpack-hot-middleware-client'),
|
join(__dirname, '..', '..', 'client', 'webpack-hot-middleware-client'),
|
||||||
|
|
Loading…
Reference in a new issue