mirror of
https://github.com/zoriya/flood.git
synced 2026-05-27 09:01:58 +00:00
flood: do not use current working path to retrieve assets
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const userConfig = require('../../config');
|
||||
@@ -15,7 +14,7 @@ delete require.cache[require.resolve('../../shared/config/paths')];
|
||||
// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
|
||||
// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
|
||||
// We also resolve them to make sure all tools using them work consistently.
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
const appDirectory = path.resolve(path.join(__dirname, '../..'));
|
||||
process.env.NODE_PATH = (process.env.NODE_PATH || '')
|
||||
.split(path.delimiter)
|
||||
.filter((folder) => folder && !path.isAbsolute(folder))
|
||||
|
||||
@@ -4,7 +4,7 @@ const userConfig = require('../../config');
|
||||
|
||||
// Make sure any symlinks in the project folder are resolved:
|
||||
// https://github.com/facebookincubator/create-react-app/issues/637
|
||||
const appDirectory = fs.realpathSync(process.cwd());
|
||||
const appDirectory = path.resolve(path.join(__dirname, '../..'));
|
||||
const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath);
|
||||
const ensureSlash = (questionablePath, needsSlash) => {
|
||||
const hasSlash = questionablePath.endsWith('/');
|
||||
|
||||
Reference in New Issue
Block a user