shellscape / webpack-manifest-plugin

webpack plugin for generating asset manifests
MIT License
1.44k stars 185 forks source link

Option to flatten? (When used with copy-wepback-plugin) #138

Closed jasonwilliams closed 6 years ago

jasonwilliams commented 6 years ago

I'm not sure where the bug lies here, but when i use the https://github.com/lcxfs1991/copy-webpack-plugin and then run manifest plugin, it includes the directories in the name of the file.

Im currently doing

        map(file) {
          // https://github.com/webpack-contrib/copy-webpack-plugin/issues/104
          // We need to do this until copy-webpack-plugin supports webpack 
          file.name = file.name.replace(/\.[a-f0-9]{10}\./, '.');
          // also remove directories...
          file.name = path.basename(file.name);
          return file;
        }

There is also a problem with the hashes appearing in the name, but i believe this has been addressed/mentioned in https://github.com/webpack-contrib/copy-webpack-plugin/issues/104

mastilver commented 6 years ago

Hi @jasonwilliams

I'm sorry, there is nothing we can do about this

Check https://github.com/danethurber/webpack-manifest-plugin/pull/45 for more details