-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional tmpdirBase attribute #60
Conversation
Facebook createreactapp ModuleScopePlugin enforced all files to be children of the source directory. A simple `tmpdirBase: paths.appSrc,` addition to the plugin configuration will ensure conformance to this rule.
util.js
Outdated
tmpdir: () => { | ||
const tmpdir = path.resolve("./.tmp-globalize-webpack"); | ||
tmpdir: (base) => { | ||
const tmpdir = path.resolve(base + "/.tmp-globalize-webpack"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use path.join
instead of +
.
Please, can you update documentation (i.e., README.md) with this additional attribute. |
Can you explain the motivation please, it's not immediately clear to me why these temporary files need to be inside your source path. |
Where should I explain the motivation? Without this change, create-react-app ModuleScopePlugin raises
As you know |
Ok @diligiant thanks for the clarification. I think the above comment is enough for my understanding. For the documentation, I think it's sufficient to simply include It's also important to add tests to ensure the different values provided to Thanks so far. |
Will add tests later today |
Excellent, ok. |
Signed-off-by: Frédéric Miserey <frederic@none.net>
@rxaviers hope the added test suits you. You'll see that I tried to be creative with the indentation of the GlobalizePlugin object ;) my create-react-app PR has been merged so this PR might be useful after all! |
Facebook createreactapp ModuleScopePlugin enforced all files to be children of the source directory. A simple `tmpdirBase: paths.appSrc,` addition to the plugin configuration will ensure conformance to this rule. Signed-off-by: Frédéric Miserey <frederic@none.net> Closes #60
Facebook createreactapp ModuleScopePlugin enforces all files to be children of the source directory.
A simple
addition to the plugin configuration will ensure conformance to this rule.
create-react-app issue #2404 needs also to be fixed (PR opened) as it prevents dot directories to pass ModuleScopePlugin gatekeeper.