|
|
|
@ -83,6 +83,18 @@ export async function resolveConfig(
|
|
|
|
|
? normalizePath(path.resolve(root, userConfig.cacheDir))
|
|
|
|
|
: resolve(root, 'cache')
|
|
|
|
|
|
|
|
|
|
const resolvedAssetsDir = normalizePath(path.resolve(outDir, assetsDir))
|
|
|
|
|
if (!resolvedAssetsDir.startsWith(outDir)) {
|
|
|
|
|
throw new Error(
|
|
|
|
|
[
|
|
|
|
|
`assetsDir cannot be set to a location outside of the outDir.`,
|
|
|
|
|
`outDir: ${outDir}`,
|
|
|
|
|
`assetsDir: ${assetsDir}`,
|
|
|
|
|
`resolved: ${resolvedAssetsDir}`
|
|
|
|
|
].join('\n ')
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// resolve theme path
|
|
|
|
|
const userThemeDir = resolve(root, 'theme')
|
|
|
|
|
const themeDir = (await fs.pathExists(userThemeDir))
|
|
|
|
|