Skip to content
This repository was archived by the owner on Nov 5, 2019. It is now read-only.
This repository was archived by the owner on Nov 5, 2019. It is now read-only.

Stable hashes #60

Open
Open
@gforcada

Description

@gforcada

I'm using script-loader to inject some Foundation JS on our bundles and noticed that if I change the path where the repository is, the contenthash changes, this completely broke our deployment pipeline as the assets are generated more than once for different distribution places and the hashes ended up being different.

Try it yourselves at https://github.com/gforcada/webpack-stable-hashes

The solution I found myself is move the import to the JS file rather than at the webpack configuration like this:

app.js
require('foundation-sites/path/to/file.js');

webpack.js

module.exports = {
  entry: {
    app: './app.js'
  },
  ...

Might be something worth mentioning on the README? 🤔

Our webpack configuration is quite complex and it took me a complete morning to pin it down to this specific lines (we have several lines like '!!script-loader!foundation-sites/dist/plugins/foundation.core.js', on our webpack configuration).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions