Coder Social home page Coder Social logo

Comments (7)

NekR avatar NekR commented on August 19, 2024

Hi @Vinnl, runtime is supposed to be a noop when you are running in dev mode, e.g. when you do not add new OfflinePlugin() to your plugins list. This way you do not need to replace runtime from source code when you are in dev-mode. However, when you add new OfflinePlugin() runtime is overridden by real runtime content.

Do you have empty runtime on production?

from offline-plugin.

Vinnl avatar Vinnl commented on August 19, 2024

Hi @NekR, the same is happening in production, unfortunately. I'm still a bit new to Webpack, so it might be that I'm somehow running in development mode. That said, I don't think so. This is what I run:

webpack -p --config webpack.prd.config.js

The output path is /build/, and if I go there and then run python -m SimpleHTTPServer 9000, I still get this output:

Runtime function () {}

from offline-plugin.

NekR avatar NekR commented on August 19, 2024

Okay, I will try to run your code, maybe some conflict with other loaders.

from offline-plugin.

Vinnl avatar Vinnl commented on August 19, 2024

That's very dedicated - let me know if there's anything I should try. I feel a bit guilty since it's not unlikely that it's me doing something wrong...

from offline-plugin.

NekR avatar NekR commented on August 19, 2024

I just do not know how to help you in other way. It's supposed to work and only thing which can cause it to not work is other loaders.

from offline-plugin.

NekR avatar NekR commented on August 19, 2024

It was this issue: webpack/webpack#2377
Just fixed and published as 2.1.1. Try it please.

from offline-plugin.

Vinnl avatar Vinnl commented on August 19, 2024

@NekR Excellent, it now works exactly as expected!

from offline-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.