Skip to content
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

feat(pv-scripts): webpack config update #232

Merged
merged 15 commits into from
Apr 26, 2024
Merged

Conversation

mbehzad
Copy link
Contributor

@mbehzad mbehzad commented Apr 17, 2024

== Description ==
Couple of updates to the webpack config:

  • removes the legacy bundle, IE support shouldn't be needed. and this will reduce the number of modules needing to be maintained,
  • combines all js (ts, jsx..) webpack setup in one rule set. this also gets rid of config for different js types being out of sync and needing to be updated separately.
  • config for bundling svg files
  • allows toggling between the new and legacy decorators via pv.config.js config. which would allow updating decorator libs independent of the pv-script version
  • this also includes feat(pv-scripts): replace using node-sass with (dart-)sass #181 node-sass -> (dart) sass
  • updates the babel dependencies

== Closes issue(s) ==

== Changes ==

== Affected Packages ==
pv-scripts

mbehzad added 12 commits May 5, 2022 10:20
use the current immplementation of sass to compile scss files

BREAKING CHANGE: see https://sass-lang.com/documentation/breaking-changes for migration from
node-sass to dart-sass
… feature/node-sass-to-dart-sass

# Conflicts:
#	packages/pv-scripts/package-lock.json
… feature/node-sass-to-dart-sass

# Conflicts:
#	packages/pv-scripts/package-lock.json
… feature/node-sass-to-dart-sass

# Conflicts:
#	packages/pv-scripts/package-lock.json
… feature/webpack-update

# Conflicts:
#	packages/pv-scripts/package-lock.json
#	packages/pv-scripts/package.json
webpack won't generate a dedicated "legacy" bundle which was meant to be used for internet explorer.
only one (js) bundle and one set of configuration for that will be used

BREAKING CHANGE: "legacy" output is removed. only the "modern" bundle is generated, without any
"module" or "modern" prefix. this also applies to all configurations (e.g. no
webpack.config.module.js or no `[modern]` group in browserlist)
… js file types (js,ts,jsx,tsx)

also remove all babel plugins that are already part of env preset

BREAKING CHANGE: (low-risk) webpack config is applied to jsx, ts and tsx files even when `useTS` or
`useReact` are false in the pv.config.json. if you prefer to have a custom webpack config for these
files instead, make sure to use `enforce: "pre"` in your custom webpack.config file
user can add e.g. `"babelDecorator": "2023-11"` to pv.config.js to use the new decorator proposal.
("legacy" will be the default version)
webpack rule to handle svg files with default and customizable comfiguration

BREAKING CHANGE: (medium-risk) svg files will automatically be boundled. check
https://github.com/pro-vision/fe-tools/tree/master/packages/pv-scripts#svg-loading to see if you
need to change your configuration
@mbehzad mbehzad changed the title webpack config update feat(pv-scripts): webpack config update Apr 17, 2024
mbehzad added 3 commits April 25, 2024 15:16
update webpack loader and plugin to their latest version

BREAKING CHANGE: Minimum `Node.js` version supported by the webpack plugins is `18.12.0`
will detect what sass implementation user has installed (`sass-embedded`, `node-sass` or
(dart-)`sass` which will outomatically be installed) and use that, this adds support for projects
not wanting to migrate to the new sass
this allows for much faster `pv-scripts  dev` start when the code hasn't been canged since the last
time
@friewerts friewerts merged commit 0c4304f into develop Apr 26, 2024
3 checks passed
@friewerts friewerts deleted the feature/webpack-update branch April 26, 2024 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants