hxlniada / webpack-concat-plugin

a plugin to help webpack to concat file and inject to html
https://github.com/hxlniada/webpack-concat-plugin
97 stars 55 forks source link

Going up a directory for files in the filesToConcat option #50

Closed minghuig closed 6 years ago

minghuig commented 6 years ago

I am trying to use webpack-concat-plugin to concat files that live under the current directory where webpack.config.js lives, and also files that live under a different directory accessed from the current directory's parent, like this:

    new ConcatPlugin({
      uglify: false,
      sourceMap: true,
      name: 'ang1_app',
      fileName: '[name].js',
      filesToConcat: ['./client/**/*.js', '../other_dir/client/**/*.js'],
      attributes: {
        async: true
      }
    }),

However, the filesToConcat option does not seem to know how to travel up the directory tree and does not include anything from the second glob (if I move "other_dir" under the current directory, it correctly finds and concats the files). Any advice on how to handle this case without having to move the other directory (which contains files shared by our other apps)?

Thanks!