0.0.8 • Published 1 year ago

unplugin-require-transform v0.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

unplugin-require-transform

transform require into import for ESM runtime compatibility

Why?

When old project migrate from webpack to vite, you may just want to run it instead of modifying every require syntax to new import syntax.

Install

npm i unplugin-require-transform --save-dev

Usage

import { defineConfig } from 'vite'
import unPluginRequireTransform from 'unplugin-require-transform/vite'

export default defineConfig({
  plugins: [
    vue(),
    unPluginRequireTransform.vite(),
    // ...etc
  ],
})

TODO

  • vue require transform
  • dedupe import
  • test for webpack and add demos
0.0.8

1 year ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago