@@ -16,7 +16,6 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
16
16
var ManifestPlugin = require ( 'webpack-manifest-plugin' ) ;
17
17
var InterpolateHtmlPlugin = require ( 'react-dev-utils/InterpolateHtmlPlugin' ) ;
18
18
var url = require ( 'url' ) ;
19
- var ensureSlash = require ( './utils/ensureSlash' ) ;
20
19
var paths = require ( './paths' ) ;
21
20
var getClientEnvironment = require ( './env' ) ;
22
21
@@ -27,11 +26,11 @@ var path = require('path');
27
26
28
27
// Webpack uses `publicPath` to determine where the app is being served from.
29
28
// It requires a trailing slash, or the file assets will get an incorrect path.
30
- var publicPath = ensureSlash ( paths . servedPath , true ) ;
29
+ var publicPath = paths . servedPath ;
31
30
// `publicUrl` is just like `publicPath`, but we will provide it to our app
32
31
// as %PUBLIC_URL% in `index.html` and `process.env.PUBLIC_URL` in JavaScript.
33
32
// Omit trailing slash as %PUBLIC_URL%/xyz looks better than %PUBLIC_URL%xyz.
34
- var publicUrl = ensureSlash ( paths . servedPath , false ) ;
33
+ var publicUrl = publicPath . slice ( 0 , - 1 ) ;
35
34
// Get environment variables to inject into our app.
36
35
var env = getClientEnvironment ( publicUrl ) ;
37
36
@@ -106,7 +105,7 @@ module.exports = {
106
105
// ** ADDING/UPDATING LOADERS **
107
106
// The "url" loader handles all assets unless explicitly excluded.
108
107
// The `exclude` list *must* be updated with every change to loader extensions.
109
- // When adding a new loader, you must add its `test`
108
+ // When adding a new loader, you must add its `test`
110
109
// as a new entry in the `exclude` list in the "url" loader.
111
110
112
111
// "url" loader embeds assets smaller than specified size as data URLs to avoid requests.
0 commit comments