rollup-plugin-virtual-fs
v4.0.1-alpha.0
Published
```bash $ npm install rollup-plugin-virtual-fs --save # or $ yarn add rollup-plugin-virtual-fs ```
Downloads
990
Readme
rollup-plugin-virtual-fs
$ npm install rollup-plugin-virtual-fs --save
# or
$ yarn add rollup-plugin-virtual-fs
Options
files: {[fpath: string]: string}
: in memory file system.extension: string
: ext search ordermemoryOnly: boolean
: Access your file system (default: true)
Example
// rollup.config.js
import { virtualFs } from "rollup-plugin-virtual-fs";
const files = {
"/index.js": `import foo from "./foo";export default () => console.log(foo);`,
"/foo.js": 'export default "foo"',
};
export default {
input: "file:///index.js",
plugins: [
virtualFs({
extensions: [".ts", ".tsx", ".js", "/index.js"], // Optional
files: {
"/index.js": "export default () => console.log('xxx')",
},
}),
],
};
LICENSE
MIT