jonathantneal / flexibility

A JavaScript polyfill for Flexbox
https://jonathantneal.github.io/flexibility/
MIT License
4.33k stars 479 forks source link

Pre-built warning in v2.0.1 #69

Open trietphamnm opened 8 years ago

trietphamnm commented 8 years ago

Webpack shows pre-built warning of v2.0.1 (npm). Could you please remove it?

flexibility_warning
jonathantneal commented 8 years ago

Thanks for letting me know, especially because I have very little experience with Webpack. Do I:

trietphamnm commented 8 years ago

There are 2 options:

  1. If you don't want to support webpack build, you can note the work-around settings for webpack user in wiki page as setting path of flexibility to module.noParse in webpack config file. Webpack won't parse your Browserify pre-built lib and use it as is.
  2. You can set npm build for webpack as below: webpack ./lib/index.js ./dist/flexibility.js -p --output-library-target umd

I came up with option 1 in my project and the warning disappeared. However, it would be great if it could support webpack build seamlessly.

Thank you for your awesome lib! It truly saved my works in IE 9.

stephanedemotte commented 8 years ago

+1

stephanedemotte commented 8 years ago

thanks @trietphamnm

quick fix.

module: {
    noParse: [/node_modules\/flexibility\/flexibility.js/],
    loaders: [
      {...}
    ]
  },