2.5.26 • Published 21 days ago

@dumlj/memfs-webpack-plugin v2.5.26

Weekly downloads
-
License
MIT
Repository
github
Last release
21 days ago

License: MIT  Github Repo  NPM Version  See Docs  codecov  DeepSource 

Memfs Webpack Plugin

File system in memory webpack plugin.

BACKGROUND

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.

INSTALL

# 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

USAGE

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.")',
      },
    }),
  ],
}

LIVE DEMO

INTERNAL DEPENDENCIES