Skip to content
This repository was archived by the owner on Mar 17, 2021. It is now read-only.
This repository was archived by the owner on Mar 17, 2021. It is now read-only.

[hash] placeholder doesn't match with all generated hashes #136

@MatteoGabriele

Description

@MatteoGabriele

Do you want to request a feature or report a bug?
bug

What is the current behavior?
I use an hashed name for the build folder which contains js chunks, extracted css files and main application bundle.

Everywhere, the placeholder [hash:8] that I'm using, returns the same string, which allows me to put javascript and css in the same generated folder: except the file-loader hash.

If the current behavior is a bug, please provide the steps to reproduce.

webpack bundle output

 ...
  output: {
    path: `${paths.appBuild}`,
    publicPath: '/',
    chunkFilename: `[hash:8]/chunks/[chunkhash:8].js`,
    filename: `[hash:8]/[name].js`
  },
 ...

ExtractTextPlugin

...
new ExtractTextPlugin({
    filename: `[hash:8]/[name].css`,
    ignoreOrder: true,
    allChunks: true
}),
...

file-loader

...
test: /\.(ico|jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2)(\?.*)?$/,
  loader: 'file-loader',
  options: {
    name: '[hash:8]/asset/[name].[ext]'
  }
...

What is the expected behavior?
The hash should be always the same like ExtractTextPlugin does

Please mention other relevant information such as your webpack version, Node.js version and Operating System.

OS: macOS Sierra
Node: v7.4.0
Webpack: v2.2.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions