File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,12 @@ class Validator {
51
51
}
52
52
53
53
if ( ! this . webpackConfig . manifestKeyPrefix ) {
54
- const outputPath = this . webpackConfig . outputPath . replace ( / \/ $ / , '' ) ;
54
+ let outputPath = this . webpackConfig . outputPath ;
55
+ // for comparison purposes, change \ to / on Windows
56
+ outputPath = outputPath . split ( '\\' ) . join ( '/' ) ;
57
+
58
+ // remove trailing slash on each
59
+ outputPath = outputPath . replace ( / \/ $ / , '' ) ;
55
60
const publicPath = this . webpackConfig . publicPath . replace ( / \/ $ / , '' ) ;
56
61
57
62
/*
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ describe('The validator function', () => {
55
55
56
56
it ( 'manifestKeyPrefix is correctly not required on windows' , ( ) => {
57
57
const config = createConfig ( ) ;
58
- config . outputPath = '/some/path/to/ build' ;
58
+ config . outputPath = 'C:\\projects\\webpack-encore\\web\\ build' ;
59
59
config . setPublicPath ( '/build/' ) ;
60
60
config . addEntry ( 'main' , './main' ) ;
61
61
You can’t perform that action at this time.
0 commit comments