Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpack-dev-server 2.8 doesn't work with Safari on macOS/iOS #834

Closed
etherbob opened this issue Sep 19, 2017 · 1 comment
Closed

webpack-dev-server 2.8 doesn't work with Safari on macOS/iOS #834

etherbob opened this issue Sep 19, 2017 · 1 comment

Comments

@etherbob
Copy link

webpack/webpack-dev-server#1090

Was running into the problem referenced above with webpack-dev-server 2.8 and webpacker 3.0.1

Adding the following to a custom config and merging it into the webpacker defaults works around it for now. I'm not sure if this is something the webpacker team would want to handle in the defaults or mention in the readme to help the odd Safari user get this working again, but thought I'd share.

config/webpack/custom.js

module: {
  rules: [
    {
      loader: 'babel-loader',
      include: [
        // webpack-dev-server#1090 for Safari
        /node_modules\/webpack-dev-server/
      ]
    }
  ]
}

config/webpack/development.js

const merge = require('webpack-merge')
const environment = require('./environment')
const customConfig = require('./custom')

module.exports = merge(environment.toWebpackConfig(), customConfig)

.babelrc

{
  "presets": [
    ["env", {
      "modules": false,
      "targets": {
        "browsers": "> 1%",
        "uglify": true
      },
      "useBuiltIns": true
    }],
    "flow"
  ],

  "plugins": [
    "transform-react-jsx",
    "syntax-dynamic-import",
    "transform-object-rest-spread",
    "transform-es2015-block-scoped-functions",
    ["transform-class-properties", { "spec": true }]
  ]
}
@gauravtiwari
Copy link
Member

Thanks for sharing, easiest workaround is use the latest webpack-dev-server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants