-
Notifications
You must be signed in to change notification settings - Fork 4
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 2 compability #7
Comments
Anyway... maybe I can stick with webpack 1 for all old projects and just don't use omit-tilde-webpack-plugin for webpack 2... |
That is a solution. However it may be possible to change behaviour based on the presence of if ('relativePath' in candidate) {
// webpack 2 behaviour
} else {
// webpack 1 behaviour
} Although I would be surprised if that is the only change to the API. I am not in a position to try Webpack 2 right now so I would be relying on you if you wanted to progress this. |
+1 for Webpack 2 support! |
Sorry finally took a look at this. In Webpack 1 we just added a tilde to the request and recursed. We didn't get stuck in a loop because (a) the process was synchronous (b) we only looked at requests with a leading Since Webpack 2 rationalised So in short, not easy to support Webpack 2. But I will see what I can do. |
Take a look that this branch, works but is flaky. There are (at minimum) race conditions with recursion detection. I'm using There is no one set of fields (in Webpack 2) that gives consistent information. I have been testing with I will have to take a much deeper dive into the Webpack 2 resolver code. However I am not confident we can achieve support. |
Hi, I just checked if this plugin works with webpack 2. Currently it throws an error at
index.js:46:43
forcandidate.request.split('!')
becausecandidate.request
isundefined
.I try, if I can fix that.
Old
candidate
(webpack 1):New
candidate
(webpack 2):But...
In webpack 1 I get:
candidate.path: /Users/foo/example/src
candidate.request: ./other-module/src/style.less
In webpack 2 I get:
candidate.path: /Users/foo/example/src/other-module/src/style.less
candidate.relativePath: ./src/other-module/src/style.less
The text was updated successfully, but these errors were encountered: