@@ -103,14 +103,13 @@ function Server(compiler, options) {
103
103
104
104
app . get ( '/webpack-dev-server' , ( req , res ) => {
105
105
res . setHeader ( 'Content-Type' , 'text/html' ) ;
106
- /* eslint-disable quotes */
107
106
res . write ( '<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body>' ) ;
108
- const outputPath = this . middleware . getFilenameFromUrl ( options . publicPath || "/" ) ;
107
+ const outputPath = this . middleware . getFilenameFromUrl ( options . publicPath || '/' ) ;
109
108
const filesystem = this . middleware . fileSystem ;
110
109
111
110
function writeDirectory ( baseUrl , basePath ) {
112
111
const content = filesystem . readdirSync ( basePath ) ;
113
- res . write ( " <ul>" ) ;
112
+ res . write ( ' <ul>' ) ;
114
113
content . forEach ( ( item ) => {
115
114
const p = `${ basePath } /${ item } ` ;
116
115
if ( filesystem . statSync ( p ) . isFile ( ) ) {
@@ -139,9 +138,8 @@ function Server(compiler, options) {
139
138
res . write ( '</li>' ) ;
140
139
}
141
140
} ) ;
142
- res . write ( " </ul>" ) ;
141
+ res . write ( ' </ul>' ) ;
143
142
}
144
- /* eslint-enable quotes */
145
143
writeDirectory ( options . publicPath || '/' , outputPath ) ;
146
144
res . end ( '</body></html>' ) ;
147
145
} ) ;
@@ -624,13 +622,11 @@ Server.prototype.serveMagicHtml = function (req, res, next) {
624
622
try {
625
623
if ( ! this . middleware . fileSystem . statSync ( this . middleware . getFilenameFromUrl ( `${ _path } .js` ) ) . isFile ( ) ) { return next ( ) ; }
626
624
// Serve a page that executes the javascript
627
- /* eslint-disable quotes */
628
625
res . write ( '<!DOCTYPE html><html><head><meta charset="utf-8"/></head><body><script type="text/javascript" charset="utf-8" src="' ) ;
629
626
res . write ( _path ) ;
630
627
res . write ( '.js' ) ;
631
- res . write ( req . _parsedUrl . search || "" ) ;
628
+ res . write ( req . _parsedUrl . search || '' ) ;
632
629
res . end ( '"></script></body></html>' ) ;
633
- /* eslint-enable quotes */
634
630
} catch ( e ) {
635
631
return next ( ) ;
636
632
}
0 commit comments