Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zodern/minify-js-sourcemaps
Meteor package to minify js and create production sourcemaps
https://github.com/zodern/minify-js-sourcemaps
meteor minify sourcemaps uglify
Last synced: 5 days ago
JSON representation
Meteor package to minify js and create production sourcemaps
- Host: GitHub
- URL: https://github.com/zodern/minify-js-sourcemaps
- Owner: zodern
- License: other
- Created: 2017-04-29T00:30:16.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-01-18T23:47:28.000Z (10 months ago)
- Last Synced: 2024-10-19T15:15:57.506Z (25 days ago)
- Topics: meteor, minify, sourcemaps, uglify
- Language: JavaScript
- Size: 105 KB
- Stars: 39
- Watchers: 7
- Forks: 10
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zodern:standard-minifier-js
Fast javascript minifier for Meteor apps that creates source maps
Features:
- Creates production source maps
- Creates source maps for Meteor packages that don't use a compiler
- Very fast by using the swc minifier, a faster js parser, and disk and memory caches
- Compatible with Meteor 1.9 and newer. For Meteor 1.4 - 1.5, use `zodern:[email protected]` for production source maps, and for Meteor 1.6 - 1.8 use `zodern:[email protected]`.
- Generates bundle stats for [bundle-visualizer](https://atmospherejs.com/meteor/bundle-visualizer)First, you need to remove `standard-minifier-js` from your app
```shell
meteor remove standard-minifier-js
```Then add this package with:
```shell
meteor add zodern:standard-minifier-js
```If you want to prevent access to the source maps, you can add the `zodern:hide-production-sourcemaps` package. Source maps include the original content from all of your client files, so you probably want to do this step.
```shell
meteor add zodern:hide-production-sourcemaps
```## Error tracking
Source maps allow error tracking services to show you better stack traces. I run [Monti APM](https://montiapm.com) which provides an error tracking service and can use your app's source maps with no additional config.
To use with other error tracking services, you will need to upload the source maps when deploying. The source map is saved in the bundle from `meteor build` at `programs//.js.map`. You will want to upload the source maps for each web arch, and for the dynamic imports for each arch.
## Caches
When deploying from CI, you will need to configure the CI to cache at least parts of the `.meteor/local` folder for the minify cache to work. Learn more at [this blog post](https://zodern.me/posts/meteor-local-folder/#caching-in-ci).
## Environment Variables
`DISABLE_CLIENT_STATS` Set to `true` to disable creating the `stats.json` file used by the bundle-visualizer. This can save a few seconds during production builds for large apps.
`METEOR_FASTMINIFIER_CACHE_DEBUG` Set to `true` to view the cache logs