Comments (6)
I find this use case to be interesting.
I'm using webpack-virtual-modules
to virtualize some of the modules that are "required" so that they won't break the application. One thing that upsets me is that the virtual modules will always take precedence over the physical files.
What I'd like to have is the flexibility to "unsubscribe" the virtual modules in favor of files that are now present my working directory and I think that the removeModule
API would be fundamental for it.
Do you see any objections to this implementation, @larixer?
from webpack-virtual-modules.
@rnarcos No objections, I would merge it, if tests will pass and the code quality will be okay-ish
from webpack-virtual-modules.
Any way that I can be in closer contact with you (or any other contributor associated to this project) in order to get a clearer vision about environment setup and contribution guide?
from webpack-virtual-modules.
@rnarcos As a core team member of Yarn package manager I'm available at a Yarn's discord:
https://discord.com/invite/yarnpkg
You are welcome to direct message me there.
from webpack-virtual-modules.
hey i think i'm trying to do the same thing as you... basically i'm replacing a module dynamically as i rebuild. i can REPLACE the fake contents with new fake contents by calling writeModule again... but i can't go back to the original easily...
it seems like
delete compiler.inputFileSystem._virtualFiles[filename];
compiler.inputFileSystem.purge(filename);
is doing the thing that i want?
edit: no it's not.... dang. but i would really like this feature...
from webpack-virtual-modules.
as a workaround i'm doing writeModule(filename, fs.readFileSync(filename))
if anybody else is stuck
from webpack-virtual-modules.
Related Issues (20)
- [Bug] Plugin causes console noise when used alongside debug.js HOT 2
- [Bug] virtual module trigger extra compilation in webpack 5 HOT 5
- [Bug] Uppercase driver letter in windows
- Incorrectly used fileWatcher, that causing writeModule not trigger recompile with webpack-dev-server HOT 1
- [Feature] GetModule/ReadModule API HOT 2
- [Bug] Using React/JSX with `webpack-virtual-modules` gives error even when `@babel/preset-react` is used HOT 1
- [Bug] HOT 1
- [Question] - Is it possible generate new virtual modules based on file-system changes? HOT 1
- [Bug] ModuleNotFoundError happened ,when I compile two project in the same progress HOT 3
- [Bug] Local version of webpack-virtual-modules in next-with-linaria HOT 3
- [Question] Next.js compatibility
- [Bug] Multiple config and broken invalidation right from the start HOT 10
- [Feature] Custom URI scheme
- What are some real usecases of this plugin? HOT 1
- [Bug] Infinite loop on the webpack 5 example HOT 8
- [Bug] Question: Trigger webpack rebuild HOT 7
- [Feature] Expose types HOT 1
- [Bug] Stale virtual module contents upon ".writeModule" HOT 6
- [Bug] Compatibility with AngularCompilerPlugin HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webpack-virtual-modules.