jharris4 / html-webpack-tags-plugin

lets you define html tags to inject with html-webpack-plugin
MIT License
256 stars 31 forks source link

Adding custom hash function doesn't seem to work #57

Closed jensbodal closed 4 years ago

jensbodal commented 4 years ago
      useHash: true,
      addHash: (assetPath, hash) => {
        const parts = assetPath.split('.');
        parts[parts.length - 1] = `${hash}.${parts[parts.length - 1]}`;
        return parts.join('.');
      },

When doing a production build with webpack the file isn't generated. If I set hash: true instead everything is fine.

Is my function wrong?

jensbodal commented 4 years ago

Never mind, the function does seem to work but I had assumed it was also copying the script to my build directory. Closing as my current comments are now in https://github.com/jharris4/html-webpack-tags-plugin/issues/56