https://github.com/pumpncode/parcel-optimizer-prepend
parcel optimizer to prepend text to the bundle file
https://github.com/pumpncode/parcel-optimizer-prepend
Last synced: 5 months ago
JSON representation
parcel optimizer to prepend text to the bundle file
- Host: GitHub
- URL: https://github.com/pumpncode/parcel-optimizer-prepend
- Owner: pumpncode
- License: mit
- Created: 2021-03-10T13:08:31.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-10T02:27:38.000Z (over 1 year ago)
- Last Synced: 2025-09-10T05:22:51.384Z (10 months ago)
- Language: JavaScript
- Homepage:
- Size: 3.04 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- Contributing: .github/contributing.md
- Funding: .github/funding.yml
- License: license.md
- Code of conduct: .github/code-of-conduct.md
- Codeowners: .github/codeowners
- Security: .github/security.md
- Support: .github/support.md
Awesome Lists containing this project
README
# parcel-optimizer-prepend
A parcel plugin to add text at the start of your bundle file.
1. Add this plugin to the optimizers in your .parcelrc file:
```json
{
"extends": "@parcel/config-default",
"optimizers": {
"*.js": ["...", "@pumpn/parcel-optimizer-prepend"]
}
}
```
Use "..." as the first entry to not overwrite the default optimizers.
2. Add a `parcel-optimizer-prepend` option and the text you wish to prepend to your package.json:
```json
{
"parcel-optimizer-prepend": "/* this will be at the top of the file */\n"
}
```
You are responsible for linebreaks, this plugin won't add them for you.
3. Stay safe!