preact-hn icon indicating copy to clipboard operation
preact-hn copied to clipboard

Webpack.browser.js

Open zouhir opened this issue 7 years ago • 1 comments

very minor thing

I needed multiple webpack for multiple env \ browsers. so instead of multiple config files my webpack configs is a function that returns an Object config.

const packer = (browserVendor, versionSupported, env?, ..) => {
  return {
    ...
  }
}

Potential benefits:

  • reduced browser specific files.
  • reduced npm scripts
  • read all browser from array of objects.

would love to know your thoughts about this.

zouhir avatar Mar 23 '17 00:03 zouhir

That's an awesome idea. I'll give it a go.

kristoferbaxter avatar Mar 23 '17 06:03 kristoferbaxter