Skip to content

fix: babel/parcel build warnings #4436

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

Merged
merged 1 commit into from
Jan 5, 2025
Merged

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Jan 5, 2025

Closes

What changed?

Tune direct dependencies to babel packages:

  • Replaced @babel/preset-env with @parcel/babel-preset-env.
  • Removed dependency to @babel/preset-react as it seems unused.

Why was this change made?

The current build is generating warnings, which I think might block upgrades of dependencies.

Before:

@parcel/transformer-babel: Parcel includes transpilation by default. Babel 


config babel.config.json includes the following redundant presets: 
@babel/preset-env. Removing these may improve build performance.
  /home/runner/work/weave-gitops/weave-gitops/babel.config.json:4:[13](https://github.com/weaveworks/weave-gitops/actions/runs/12616980125/job/35158760634#step:7:14)
    3 |         [
  > 4 |             "@babel/preset-env",
  >   |             ^^^^^^^^^^^^^^^^^^^
    5 |             {
    6 |                 "targets": {
  💡 Remove the above presets from babel.config.json
  📝 Learn more: https://parceljs.org/languages/javascript/#default-presets

@parcel/transformer-babel: @babel/preset-env does not support Parcel's targets, 

which will likely result in unnecessary transpilation and larger bundle sizes.
  /home/runner/work/weave-gitops/weave-gitops/babel.config.json:4:13
    3 |         [
  > 4 |             "@babel/preset-env",
  >   |             ^^^^^^^^^^^^^^^^^^^
    5 |             {
    6 |                 "targets": {

  💡 Either remove @babel/preset-env to use Parcel's builtin transpilation, 
     or replace with @parcel/babel-preset-env
  📝 Learn more: https://parceljs.org/languages/javascript/#custom-plugins

@parcel/transformer-babel: Parcel includes transpilation by default. Babel 



  💡 Remove the above presets from babel.config.json
  📝 Learn more: https://parceljs.org/languages/javascript/#default-presets



  💡 Either remove @babel/preset-env to use Parcel's builtin transpilation, 
     or replace with @parcel/babel-preset-env
  📝 Learn more: https://parceljs.org/languages/javascript/#custom-plugins

config babel.config.json includes the following redundant presets: 
@babel/preset-env. Removing these may improve build performance.
  /home/runner/work/weave-gitops/weave-gitops/babel.config.json:4:13
    3 |         [
  > 4 |             "@babel/preset-env",
  >   |             ^^^^^^^^^^^^^^^^^^^
    5 |             {
    6 |                 "targets": {
@parcel/transformer-babel: @babel/preset-env does not support Parcel's targets, 
which will likely result in unnecessary transpilation and larger bundle sizes.
  /home/runner/work/weave-gitops/weave-gitops/babel.config.json:4:13
    3 |         [
  > 4 |             "@babel/preset-env",
  >   |             ^^^^^^^^^^^^^^^^^^^
    5 |             {
    6 |                 "targets": {

After:

@parcel/transformer-babel: Parcel includes transpilation by default. Babel config babel.config.json includes the following redundant presets: @parcel/babel-preset-env. Removing these may improve build performance.

  /workspaces/weave-gitops/babel.config.json:4:13
    3 |         [
  > 4 |             "@parcel/babel-preset-env",
  >   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
    5 |             {
    6 |                 "targets": {

  💡 Remove the above presets from babel.config.json
  📝 Learn more

Really no idea what I am doing here, so please judge this carefully.

How was this change implemented?

How did you validate the change?

Release notes

Documentation Changes

@erikgb erikgb requested review from tenstad and casibbald January 5, 2025 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants