Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
rsbuild-plugin-generate-file
Advanced tools
rsbuild-plugin-generate-file is a rsbuild plugin which generate static file and write them to dist folder after packaging.
Install dev dependency :
yarn add rsbuild-plugin-generate-file -D
npm install rsbuild-plugin-generate-file -D
Add plugin to your rsbuild.config.ts
:
// rsbuild.config.ts
import { pluginGenerateFile } from 'rsbuild-plugin-generate-file';
export default {
plugins: [
pluginGenerateFile([{
type: 'json',
output: './output.txt',
data: {
foo: 'bar'
}
}])
]
}
Here are the available options for configuration:
Name | Description | Options | Defaults |
---|---|---|---|
type | Specifies the format type of the generated file. | json yaml template | json |
output | Defines the path to the output file that the plugin will generate. This path is relative to the dist folder. | - | ./output.txt |
template | Specifies the path to the template file. Supports ejs format template. This option is available when type is set to template . | - | - |
data | Specifies the data to be used in the generated file or to be passed into the template. | - | - |
contentType | Defines the Content-Type response returned from the dev server. If left empty, it will be inferred from the output path extension. | - | - |
In dev mode, plugin will mock file by dev server. See localhost:8080/__generate_file_list/ for more detail.
This plugin was inspired by Alicevia/vite-plugin-generate-config-into-dist and sumy7/vite-plugin-generate-file and antfu/vite-plugin-inspect
MIT
FAQs
A plugin for rsbuild to generate file
We found that rsbuild-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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.