gittheking / PERN_template

Other
11 stars 29 forks source link

polyfill support #3

Open kierangillen opened 7 years ago

kierangillen commented 7 years ago

Hey I added some code to the webpack.config.js to support Fetch on Safari.

I changed the entry to:

  entry: ['whatwg-fetch', `${APP_DIR}/index.js`],

In the plugins array I added:

    new webpack.ProvidePlugin({
    Promise: 'promise-polyfill'
    })

I also added to the package.json in dependencies:

    "promise-polyfill": "^6.0.2",
    "whatwg-fetch": "^2.0.1"

I had to remove two lines from deployment_react.sh for Heroku to accept whatwg-fetch.

npm run clean -s
rm -rf node_modules
kierangillen commented 7 years ago

also:

      {
        test: /\.(eot|svg|ttf|woff|woff2)$/,
        loader: 'file-loader?name=/fonts/[name].[ext]'
      }

for more font files