Closed
Description
Hi,
first of all thank you for this app. It makes developing react apps a lot easier. What I now want to achieve is separating some controls/modules from my app and keep them in a different folder (outside of src). The problem is that css and babel loader ignore all files outside of src (and symlinks are resolved).
The idea is to make the loader paths extensible via the .env file (quite similar to NODE_PATH variable)
ADDITIONAL_APP_SOURCES=..\controls-app1\src;..\controls-app2\src
and adapt path.js
var appSrcs = (process.env.ADDITIONAL_APP_SOURCES || '')
.split(process.platform === 'win32' ? ';' : ':')
.filter(Boolean)
.filter(folder => !path.isAbsolute(folder))
.concat(['src'])
.map(resolveApp);
...
module.exports = {
appBuild: resolveApp('build'),
appPublic: resolveApp('public'),
appHtml: resolveApp('public/index.html'),
appIndexJs: resolveApp('src/index.js'),
appPackageJson: resolveApp('package.json'),
appSrc: appSrcs,
yarnLockFile: resolveApp('yarn.lock'),
testsSetup: resolveApp('src/setupTests.js'),
appNodeModules: resolveApp('node_modules'),
// this is empty with npm3 but node resolution searches higher anyway:
ownNodeModules: resolveOwn('../node_modules'),
nodePaths: nodePaths
};
Is this a good idea? Am I missing something?
With kind regards,
Christian
Metadata
Metadata
Assignees
Labels
No labels