Giter VIP home page Giter VIP logo

Comments (10)

nyngwang avatar nyngwang commented on June 6, 2024

What is RRWP? Did you mean this plugin? Nevermind, thinking about your problem now.

from react-refresh-webpack-plugin.

JKHSDTV avatar JKHSDTV commented on June 6, 2024

Yes, someone on IRC referenced it like that and I was under the impression that it was a common abbreviation.

from react-refresh-webpack-plugin.

nyngwang avatar nyngwang commented on June 6, 2024

I will need to see your webpack.config.js, just provide me the part you setup for devServer. The setup itself is tricky.

from react-refresh-webpack-plugin.

JKHSDTV avatar JKHSDTV commented on June 6, 2024
{
  devtool: "eval-source-map",
  mode: "development",
  devServer: {
    hot: true,
    liveReload: false,
    allowedHosts: [ "all" ],
    devMiddleware: { writeToDisk: true, index: false },
    proxy: [{
      context: [
        "**",
        "!/client/our-client.js"
      ],
      target: "http://localhost:8000",
      proxyTimeout: 1000 * 60 * 30,
      timeout: 1000 * 60 * 30
    }],
    compress: false,
    port: 9000
  }
}

And we run webpack like so: webpack serve --config=webpack.development.config.js

from react-refresh-webpack-plugin.

nyngwang avatar nyngwang commented on June 6, 2024

@JKHSDTV Does your <ClientContent /> directly contain those many Foo.jsx component wrapped by a FooContainer.js container? If so try adding one more layer like this:

<App/> -> <ClientContent/> -> many `Foo.jsx`

Also, make sure that you don't use any anonymous function for default export.

reference: https://github.com/pmmmwh/react-refresh-webpack-plugin/blob/main/docs/TROUBLESHOOTING.md#troubleshooting

from react-refresh-webpack-plugin.

JKHSDTV avatar JKHSDTV commented on June 6, 2024

Got multiple levels like that between Foo and ClientContent, and no anonymous default exports. Went through all the troubleshooting, none seem to apply.

from react-refresh-webpack-plugin.

JKHSDTV avatar JKHSDTV commented on June 6, 2024

I've got another clue, I think: when I limited my module.hot.accept to accept a specific file, like module.hot.accept('./stuff/WhatEverStuff.js'), I got the error message Error: Aborted because ./src/stuff/WhatEverStuff.js is not accepted. However, if I change the accept to include the src part of the path, it (correctly, since main.js is in src) complains that it can't resolve ./src/stuff/WhatEverStuff.js. I am not certain what could be introducing this mismatch.

from react-refresh-webpack-plugin.

pmmmwh avatar pmmmwh commented on June 6, 2024

Are you doing any manual module.hot.accept?

from react-refresh-webpack-plugin.

pmmmwh avatar pmmmwh commented on June 6, 2024

It would be helpful if a reproduction can be provided

from react-refresh-webpack-plugin.

JKHSDTV avatar JKHSDTV commented on June 6, 2024

Are you doing any manual module.hot.accept?

Your responded to a comment from me about how I use module.hot.accept 😂

I'm afraid it's the typical situation of where it's part of a complex proprietary setup that isn't easy to export as a test case :(

from react-refresh-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.