@farmfe/plugin-virtual
TypeScript icon, indicating that this package has built-in type declarations

0.0.8 • Public • Published

@farmfe/plugin-virtual

Inspired By @rollup/plugin-virtual

🍣 A Rollup plugin which loads virtual modules from memory

install

pnpm add @farmfe/plugin-virtual --save-dev # or yarn add @farmfe/plugin-virtual --save-dev

Usage

farm.config.ts

import { defineConfig } from '@farmfe/core';

export default defineConfig({
  plugins: [
    [
      '@farmfe/plugin-virtual',
      {
        'virtual-module': 'export const a = 1',
        'src/01.js': 'export const module01 = "virtual-module"',
      },
    ],
  ],
});

index.js

import { a } from 'virtual-module';

src/02.js

import { module01 } from './01.js';

Dependents (1)

Package Sidebar

Install

npm i @farmfe/plugin-virtual

Weekly Downloads

1,256

Version

0.0.8

License

MIT

Unpacked Size

7.75 kB

Total Files

6

Last publish

Collaborators

  • shulandmimi
  • roland_reed
  • wre232114