We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02161d0 commit a33831bCopy full SHA for a33831b
src/node/config.ts
@@ -83,6 +83,18 @@ export async function resolveConfig(
83
? normalizePath(path.resolve(root, userConfig.cacheDir))
84
: resolve(root, 'cache')
85
86
+ const resolvedAssetsDir = normalizePath(path.resolve(outDir, assetsDir))
87
+ if (!resolvedAssetsDir.startsWith(outDir)) {
88
+ throw new Error(
89
+ [
90
+ `assetsDir cannot be set to a location outside of the outDir.`,
91
+ `outDir: ${outDir}`,
92
+ `assetsDir: ${assetsDir}`,
93
+ `resolved: ${resolvedAssetsDir}`
94
+ ].join('\n ')
95
+ )
96
+ }
97
+
98
// resolve theme path
99
const userThemeDir = resolve(root, 'theme')
100
const themeDir = (await fs.pathExists(userThemeDir))
0 commit comments