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

Hot Module Replacement breaks on 0.3.1 #37

Closed
appsforartists opened this issue Nov 27, 2014 · 6 comments
Closed

Hot Module Replacement breaks on 0.3.1 #37

appsforartists opened this issue Nov 27, 2014 · 6 comments

Comments

@appsforartists
Copy link

HMR works on the exact same codebase on 0.2.0 and not on 0.3.1.

Steps to Reproduce

  1. Start the Webpack Dev Server
  2. Change a .scss file

Expected Result

Webpack recompiles the file and resends it to the browser.

Actual Result

It works on 0.2.0. Nothing happens on 0.3.1. (Webpack doesn't even recompile the file.)

Notes

In 0.3.1, I get this error on every compile:

File to import not found or unreadable: Roboto

I do not get it in 0.2.0.

Here's the only import that contains "Roboto":

@import url(http://fonts.googleapis.com/css?family=Roboto:500,500italic,400,400italic,300,300italic|Roboto+Condensed:400);

And here's my webpack.config.js:

{
  "entry":          {
                      "jsx":    [
                                  "node_modules/Ambidex/src/render.client.js",
                                  "webpack-dev-server/client?http://tardis.local:8078",
                                  "webpack/hot/dev-server"
                                ],

                      "styles": [
                                  "tardis/styles.scss",
                                  "webpack-dev-server/client?http://tardis.local:8078",
                                  "webpack/hot/dev-server"
                                ]
                    },

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

  "module":         {
                      "loaders":  [
                                    {
                                      "test":   /\.jsx?$/,
                                      "loader": "react-hot-loader!jsx-loader?harmony"
                                    },
                                    {
                                      "test":   /\.scss$/,
                                      "loader": "style-loader!css-loader!autoprefixer-loader!sass-loader"
                                    }
                                  ]
                    },

  "output":         {
                      "filename":       "[name].js",
                      "chunkFilename":  "chunk_[id].js",
                      "publicPath":     "http://tardis.local:8078/bundles/",
                      "pathinfo":       true,
                      "path":           "tardis/./bundles/"
                    },

  "plugins":        [
                      new Webpack.optimize.DedupePlugin(),
                      new Webpack.optimize.OccurenceOrderPlugin(),
                      new Webpack.HotModuleReplacementPlugin(),
                      new Webpack.DefinePlugin(
                        {
                          "__ambidexRoutesPath":  "\"tardis/routes.jsx\""
                        }
                      )
                    ],

  "context":        "node_modules/Ambidex/src",

  "resolveLoader":  {
                      "root":           "node_modules/Ambidex/node_modules"
                    }
}
@talwoolf
Copy link

I am getting a similar thing, except I dont get any errors but the file does not recompile or update the app. Anyone found a solution for this?

@chrishowes
Copy link

+1

@DawidJanczak
Copy link

+1 Same here. No errors, but also no recompile trigger on file save.

@nerdgrass
Copy link

+1 same here. Everything else works fine, no sass recompile on saved file.

@DawidJanczak
Copy link

I just noticed that HMR seems to work again on 0.4.2, but breaks on 1.x.

@DawidJanczak DawidJanczak mentioned this issue Jul 21, 2015
@jhnns
Copy link
Member

jhnns commented Jul 27, 2015

Fixed with #113

@jhnns jhnns closed this as completed Jul 27, 2015
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

6 participants