Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
fjsj committed Dec 19, 2023
1 parent 93715d4 commit 6e4a4f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: main
name: test

on:
push:
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Webpack Bundle Tracker [![Join the chat at https://gitter.im/owais/webpack-bundle-tracker](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/owais/webpack-bundle-tracker?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![master build status](https://github.com/django-webpack/webpack-bundle-tracker/actions/workflows/test.yml/badge.svg)](https://github.com/django-webpack/webpack-bundle-tracker/actions/workflows/test.yml)
# Webpack Bundle Tracker

[![master build status](https://github.com/django-webpack/webpack-bundle-tracker/actions/workflows/config.yml/badge.svg)](https://github.com/django-webpack/webpack-bundle-tracker/actions/workflows/config.yml)

Spits out some stats about webpack compilation process to a file.

Expand All @@ -16,9 +16,10 @@ This project is compatible with NodeJS versions 16 and up.

:warning: Starting on version 17, NodeJS uses OpenSSL v3 which has compatibility issues with Webpack@4. This isn't an issue for Webpack@5, however
if you're using Node >= 17 and Webpack@4, to properly use this package you must ensure to set the `NODE_OPTIONS=--openssl-legacy-provider` environment
variable. You can read more about this on https://github.com/webpack/webpack/issues/14532.
variable. You can read more about this on https://github.com/webpack/webpack/issues/14532.

## Migrating from version 1.x.y to 2.x.y

Starting on version 2.0.0, when creating a new instance of `BundleTracker`, the usage of the `path` parameter has been fixed and it's now being used to generate the output path for the stats file, together with the `filename` parameter. On version 2.0.0, if the `path` parameter is ommited from the constuctor call, it will attempt to place the stats file at the `output.path` directory (if also ommited, will use `'.'` as a fallback). Also, version 2.0.0 doesn't allow sub-directories to be included on the `filename`, only allowing to include them on the `path` param. To avoid those issues, when migrating, double-check if the file placement is as expected. The usage of these parameters is documented [here](#usage) and [here](#options).

## Usage
Expand Down Expand Up @@ -92,9 +93,7 @@ And in case `logTime` option is set to `true`, the output will look like,
{
"status": "done",
"chunks": {
"app": [
"app-0828904584990b611fb8.js"
]
"app": ["app-0828904584990b611fb8.js"]
},
"assets": {
"app-0828904584990b611fb8.js": {
Expand Down Expand Up @@ -181,7 +180,7 @@ passed to the `space` parameter in `JSON.stringify`. More information can be fou

| Name | Type | Default | Description |
| ----------------- | ----------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `path` | `{String}` | `'.'` | Output directory of bundle tracker JSON file. Will attempt to use `output.path` before falling back to the default value. |
| `path` | `{String}` | `'.'` | Output directory of bundle tracker JSON file. Will attempt to use `output.path` before falling back to the default value. |
| `filename` | `{String}` | `'webpack-stats.json'` | Name of the bundle tracker JSON file. |
| `publicPath` | `{String}` | (ignored) | Override `output.publicPath` from Webpack config. |
| `relativePath` | `{Boolean}` | `false` | Show relative path instead of absolute path for bundles in JSON Tracker file. Path are relative from path of JSON Tracker file. |
Expand Down

0 comments on commit 6e4a4f4

Please sign in to comment.