-
Notifications
You must be signed in to change notification settings - Fork 154
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
Webpack entry cannot be found after importing filer #790
Comments
cc @bcheidemann, who might have thoughts. |
Thanks for raising this issue @thomas-jakemeyn. The problem seems to be that we import the whole of filer when we only need the const { FilerWebackPlugin } = require('filer/webpack'); @thomas-jakemeyn Until the fix is released, you should be able to import the class directly: // Direct import
const FilerWebpackPlugin = require('filer/src/webpack-plugin'); Let me know if this works for you! :) |
Hello @bcheidemann, I confirm that using a direct import as you suggested works. Thank you for that! |
@thomas-jakemeyn The Are you having trouble with the |
The problem that I was personally facing is solved with your suggestion. |
re: the |
Thanks for the clarification @humphd. @thomas-jakemeyn do you anticipate other issues that wouldn't be solved by PR #793? Happy to rethink our approach if there's reason to do so :) |
Since |
No problem! @humphd shall we proceed with PR #793 so we can close this issue? EDIT: I have seen the other issue about the shims not being present in the version distributed through npm - don't have time to address that until this evening or tomorrow but we should probably ship any fix for that with the fix for this issue imo |
Landed #793, I'll ship v1.4.0 in a min. |
Thanks! |
@humphd I think this issue needs to be reopened. I just checked the latest NPM release (v1.4.0) and the new import is not working. This is because I added a root folder called "webpack" which wasn't released to NPM. Could you advise on what I need to change so that this is included in the release to NPM? This is also the case for the "shims" directory which is the reason for issue #791 |
Should be fixed by v1.4.1 |
Confirmed, the correct files have been pushed to NPM |
Context
I am trying to add
FilerWebpackPlugin
to an existing Webpack configuration.Problem
As soon as I
require('filer')
, Webpack starts failing because it cannot find the entry file anymore.Analysis
This problem seems to be caused by a side effect in
src/path.js
:Workaround
The only workaround that I found is to save
process.cwd
before importingfiler
, and to restore it afterwards.With this fix, Webpack is able to find the entry file again.
The text was updated successfully, but these errors were encountered: