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

Error: Aborted because ... is not accepted #132

Closed
sahanarula opened this issue Mar 28, 2017 · 4 comments
Closed

Error: Aborted because ... is not accepted #132

sahanarula opened this issue Mar 28, 2017 · 4 comments

Comments

@sahanarula
Copy link

sahanarula commented Mar 28, 2017

The app is not accepting the update and throws a warning Error: Aborted because ... is not accepted

webpack.config

module.exports = {
  "entry": ["whatwg-fetch", "babel-polyfill", "./app/app.js"],

  "stats": {
      "colors": false,
      "modules": true,
      "reasons": true
  },

  "failOnError": true, 

  "resolve": {
    "extensions": ['.js', '.jsx', '.json']
  },

  "module": {
    "loaders": [
      {
        "test": /\.jsx?$/,
        "exclude": /node_modules/,
        "loaders": ["babel-loader"]
      }
    ]
  },
}

grunt config

  {
      "webpack": _.extend(_.clone(webpackConfig), {
        "output": {
            "path": __dirname,
            "filename": "abc.js",
            "publicPath": "http://localhost:8080/",
        }
      }),

      "contentBase": __dirname + "/../../app",
      "filename": "abc.js",
      "inline": true,
      "hot": true,
    }

Expected Behavior

The app should update only selective components based on the HMR update.

Current Behavior

It reloads after throwing the above mentioned warning.

Your Environment

software version
webpack 2.2.1
grunt-webpack 3.0.0-beta.1
grunt 1.0.1
node 4.3.0
npm 2.14.12
Operating System macOS Sierra
@danez
Copy link
Collaborator

danez commented Mar 28, 2017

Can you try if this is fixed with 3.0.0-beta.1 ? We fixed a lot of stuff with the dev-server.
https://github.com/webpack-contrib/grunt-webpack/releases/tag/v3.0.0-beta.1

@sahanarula
Copy link
Author

I already tried it with 3.0.0-beta.1

@danez
Copy link
Collaborator

danez commented Apr 7, 2017

Ok I digged into this problem a little bit and was able to reproduce this, but not only with grunt-webpack, but also with webpack-dev-server itself.
Depending on how you use hot reloading you may need to modify your entrypoint and add

if (module.hot)
  module.hot.accept()

From: webpack/webpack-dev-server#395 (comment)

Let me know if that helps.

@danez
Copy link
Collaborator

danez commented Apr 11, 2017

Closing for now, please reopen if you can reproduce with grunt-webpack but not with webpack-dev-server cli.

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