-
Notifications
You must be signed in to change notification settings - Fork 72
LG-5764 experiment - publishing both non-minified and minified bundles #3325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 5 commits
f17f7cb
e696014
3bfcd59
fa18914
aa5d92b
5cfe819
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@lg-charts/legend': minor | ||
| --- | ||
|
|
||
| Updated `@lg-charts/legend` package build configuration to generate both non-minified and minified bundles. The default export is now the non-minified bundle, with the minified bundle provided as a production-specific export. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@lg-tools/build': minor | ||
| '@lg-tools/cli': minor | ||
| --- | ||
|
|
||
| Introduced new `lg build-minify` and `lg-build minify` commands to separately minify JavaScript bundle files. | ||
| Files to be minified can be specified using the `--glob` argument (default: `--glob=dist/**/*.*js --glob=!dist/**/*-min.*js`). | ||
| This allows generating both minified and non-minified bundles in the same package for use in different environments, decoupling minification from the main build process. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,8 +41,18 @@ | |
| ".": { | ||
| "types": "./dist/types/index.d.ts", | ||
| "types@<=5.0": "./dist/types/ts4.9/index.d.ts", | ||
| "import": "./dist/esm/index.js", | ||
| "require": "./dist/umd/index.js" | ||
| "import": { | ||
| "browser": { | ||
| "production": "./dist/esm/index-min.js" | ||
| }, | ||
| "default": "./dist/esm/index.js" | ||
|
Comment on lines
+44
to
+48
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't remember: is
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried |
||
| }, | ||
| "require": { | ||
| "browser": { | ||
| "production": "./dist/umd/index-min.js" | ||
| }, | ||
| "default": "./dist/umd/index.js" | ||
| } | ||
|
Comment on lines
+44
to
+55
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For all my complaining about updating package.json files, I missed that this is necessary to get the dev builds. At least this is optional now though. We should open a ticket to roll this out across the codebase
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll create a ticket.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Created two sub-tasks for the existing story.
|
||
| } | ||
| }, | ||
| "typesVersions": {} | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| import { | ||
| storiesConfig, | ||
| modernDevProdConfig, | ||
| } from '@lg-tools/build/config/rollup.config.mjs'; | ||
|
|
||
| export default [storiesConfig, modernDevProdConfig]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this needs to be updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, right. I'll update it 🫡