From 6e4a4f4f55ba8f90786b7e0d20b996024cb3f366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20Juvenal?= Date: Tue, 19 Dec 2023 09:33:53 -0300 Subject: [PATCH] Update README --- .github/workflows/config.yml | 2 +- README.md | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index c8c7a63..4abcce4 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -1,4 +1,4 @@ -name: main +name: test on: push: diff --git a/README.md b/README.md index 340ade4..37895d5 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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": { @@ -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. |