fix(v2): do not reveal environment file path (#1692)

* fix(v2): do not reveal environment file path

* changelog

* fix broken markdown linking
This commit is contained in:
Yangshun Tay 2019-07-22 23:12:21 -07:00 committed by Endi
parent 84b2270039
commit a684806a0f
9 changed files with 48 additions and 41 deletions

View file

@ -47,10 +47,8 @@ module.exports = function(context, opts) {
return pagesFiles.map(relativeSource => {
const source = path.join(pagesDir, relativeSource);
const aliasedSource = path.join(
'@site',
path.relative(siteDir, source),
);
// Cannot use path.join() as it resolves '../' and removes the '@site'. Let webpack loader resolve it.
const aliasedSource = `@site/${path.relative(siteDir, source)}`;
const pathName = encodePath(fileToPath(relativeSource));
// Default Language.
return {