1.0.9 • Published 2 years ago

@jswork/vite-plugin-file-callback v1.0.9

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

vite-plugin-file-callback

Vite plugin that allows users to customize file handling and modification through callback functions.

version license size download

installation

npm install @jswork/vite-plugin-file-callback

usage

import fileCallback from '@jswork/vite-plugin-file-callback';

// Get envs:
const env = ENV[process.env.NODE_ENV];

// Use plugin:
fileCallback({
  filepath: 'src/manifest.json',
  callback: (content) => {
    nx.set(content, 'mp-weixin.appid', env['VITE_APP_APPID']);
    return content;
  }
})

license

Code released under the MIT license.

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago