-
-
Notifications
You must be signed in to change notification settings - Fork 183
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
fix: make sure paths are consistent from os to os #78
Conversation
Codecov Report
@@ Coverage Diff @@
## master #78 +/- ##
==========================================
+ Coverage 98.57% 98.64% +0.07%
==========================================
Files 2 2
Lines 70 74 +4
==========================================
+ Hits 69 73 +4
Misses 1 1
Continue to review full report at Codecov.
|
lib/plugin.js
Outdated
@@ -110,6 +110,12 @@ ManifestPlugin.prototype.apply = function(compiler) { | |||
}.bind(this)); | |||
} | |||
|
|||
files = files.map(file => { | |||
file.name = file.name.replace('\\', '/'); | |||
file.path = file.path.replace('\\', '/'); |
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.
'\\'
is equivalent /\//
but /\//g
expected
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.
'sdfds\\sdfsdf\\'.replace('\\', '/') // -> "sdfds/sdfsdf\"
'sdfds\\sdfsdf\\'.replace(/\\/, '/') // -> "sdfds/sdfsdf\"
'sdfds\\sdfsdf\\'.replace(/\\/g, '/') // -> "sdfds/sdfsdf/"
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.
Good catch 👍
spec/plugin.spec.js
Outdated
webpackCompile({ | ||
context: __dirname, | ||
entry: { | ||
'dir\\main': './fixtures/file.js' |
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.
add some\\dir\\main also
c578e38
to
1adf3ef
Compare
@a-x- fixed the issue you spotted :) |
closes #60