File system in memory webpack plugin.
If you do not care about the files of input or output (e.g. demo project), you can store files in the memory. This plugin can store file in memory for webpack.
# use npm
$ npm install --dev @dumlj/memfs-webpack-plugin
# use yarn
$ yarn add --dev @dumlj/memfs-webpack-plugin
# use pnpm
$ pnpm add @dumlj/memfs-webpack-plugin -D
import { MemfsWebpackPlugin } from '@dumlj/memfs-webpack-plugin'
export default {
// ...
plugins: [
new MemfsWebpackPlugin({
readFromDisk: false,
writeToDisk: false,
files: {
'./src/index.js': 'console.log("i am virtual module.")',
},
}),
],
}
@dumlj/memfs-webpack-plugin └─┬ @dumlj/seed-webpack-plugin ├─┬─ @dumlj/feature-updater │ ├─── @dumlj/shell-lib │ ├─── @dumlj/util-lib │ └─── @dumlj/mock-libPRIVATE └─── @dumlj/mock-libPRIVATE