Skip to content

Instantly share code, notes, and snippets.

@eugeniosegala
Created October 6, 2018 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eugeniosegala/0da3dc481b61c0d3e135490d3397e8b7 to your computer and use it in GitHub Desktop.
Save eugeniosegala/0da3dc481b61c0d3e135490d3397e8b7 to your computer and use it in GitHub Desktop.
output: {
// The build folder.
path: paths.appBuild,
// Generated JS file names (with nested folders).
// There will be one main bundle, and one file per asynchronous chunk.
// We don't currently advertise code splitting but Webpack supports it.
filename: 'static/js/[name].[chunkhash:8].js',
chunkFilename: 'static/js/[name].[chunkhash:8].chunk.js',
// We inferred the "public path" (such as / or /my-project) from homepage.
publicPath: publicPath,
// Point sourcemap entries to original disk location (format as URL on Windows)
devtoolModuleFilenameTemplate: info =>
path
.relative(paths.appSrc, info.absoluteResourcePath)
.replace(/\\/g, '/'),
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment