GithubHelp home page GithubHelp logo

Comments (8)

chrisblossom avatar chrisblossom commented on May 1, 2024 1

@christianalfoni It would be great for you to share your solution for the next person with the same issue.

from memory-fs.

chrisblossom avatar chrisblossom commented on May 1, 2024

@christianalfoni Yes you can, see webpack-dev-middleware/blob/master/middleware.js#L33 for an example how to use it.

from memory-fs.

christianalfoni avatar christianalfoni commented on May 1, 2024

Fantastic, thanks for pointing me in the right direction :-)

from memory-fs.

christianalfoni avatar christianalfoni commented on May 1, 2024

Though, hm, this seems to be only the output as "in memory"? I also need the input to webpack to me from "in memory" fs. Or am I misunderstanding the code maybe?

from memory-fs.

chrisblossom avatar chrisblossom commented on May 1, 2024

@christianalfoni I am not sure what you are trying to do, sorry.

from memory-fs.

christianalfoni avatar christianalfoni commented on May 1, 2024

Okay, sorry, let me explain a bit better with an example :-)

  1. I have an online IDE with multiple files in a file structure
  2. I want to pass these files to the server. Just a string and a virtual filepath for each file
  3. I want to add these files to an "in memory file system"
  4. I want webpack to read from this "in memory file system" and bundle the files to an "in memory" output (which the middleware already does)
  5. This bundled output is loaded by a preview window on the client

Since the webpack compiler watches the "in memory filesystem" any file changes I pass to the server will make the compiler react to it and do superfast rebundling, where the preview window on the client will again grab it.

This makes it possible for the online IDE to write applications using webpack, loaders, node packages etc.

from memory-fs.

christianalfoni avatar christianalfoni commented on May 1, 2024

I found a way to solve it! Thanks for helping out :-)

from memory-fs.

christianalfoni avatar christianalfoni commented on May 1, 2024

Ah, yes, sorry. Its currently in "pre pre alpha", but here it is: https://github.com/christianalfoni/webpack-bin. Also running on Heroku now, http://webpackbin.herokuapp.com

from memory-fs.

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.