
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
vite-plugin-generate-file
Advanced tools
vite-plugin-generate-file is a vite plugin which generate static file and write them to dist folder after packaging.
Install dev dependency :
yarn add vite-plugin-generate-file -D
npm install vite-plugin-generate-file -D
Add plugin to your vite.config.ts
:
// vite.config.ts
import generateFile from 'vite-plugin-generate-file'
export default {
plugins: [
generateFile([{
type: 'json',
output: './output.txt',
data: {
foo: 'bar'
}
}])
]
}
Available options:
Name | Description | Options | Defaults |
---|---|---|---|
type | Generate file format type. | json yaml template | json |
output | Path to the output file the plugin will generate. It relative to dist folder. | - | ./output.txt |
template | Path to the template file. Support ejs format template. Available while type is template . | - | - |
data | Data to use in generated file or be passed in to the template. | - | - |
In dev mode, plugin will mock file by dev server. See localhost:3000/__generate_file_list/ for more detail.
This plugin was inspired by Alicevia/vite-plugin-generate-config-into-dist and antfu/vite-plugin-inspect
MIT
FAQs
Generate extra file to dist folder.
We found that vite-plugin-generate-file demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.