🌜
🌞
@parcel/babel-preset-env

@parcel/babel-preset-env

v2.7.0

The zero configuration build tool for the web. 📦🚀

npm install @parcel/babel-preset-env

README

./packages/core/parcel/README.md

Release Notes

2.7.0
By Devon Govett • Published on August 3, 2022

Added

  • Core
    • Log resolved targets in verbose log level for debugging - Details
    • Allow plugin configs to be written with .cjs extension - Details
  • JavaScript
    • Support react refresh for @emotion/react - Details
    • Inject script for hmr when there is only normal script in html - Details
  • Elm
    • Add support for compiling multiple modules at once via with query param - Details
  • CSS
    • Add support for errorRecovery option in @parcel/transformer-css - Details
  • Experimental bundler - Details
    • Implement bundling for multiple targets
    • Internalize async dependencies
    • Merge bundles of the same type
    • Fix missing module - Details

Fixed

  • JavaScript
    • Default interop missing when importing a CommonJS module - Details
    • Add missing imports for external dependencies in skipped assets - Details
    • Bump SWC to fix undefined variables - Details
    • Remove charset from JS loaded script to avoid double fetching in Firefox - Details
    • Use placeholder expression when replacing unused symbols - Details
  • Core
    • Fix atomic writestream handling on Windows - Details
    • Fix non-deterministic bundle hashes between builds due to symbol propagation - Details
    • Fix TypeScript types for @parcel/package-manager - Details
  • Dependencies
2.6.2
By Devon Govett • Published on June 22, 2022

This release includes bug fixes:

  • Core
    • Fix race condition between writing and reading from cache - Details
2.6.1
By Devon Govett • Published on June 17, 2022

This release includes bug fixes:

  • JavaScript
    • Fix issue with conditional dependencies based on process.env - Details
    • Fix transformation of import/requires wrapped into Promise.resolve() - Details
    • Fix object literal shorthand with imported variables - Details
    • Fix imported values in computed optional member expressions - Details
    • Bump SWC to fix issue with missing parenthesis in optional chaining call - Details
    • Bump SWC to fix helper imports in Node ESM libraries - Details
  • Resolution
    • Add missing invalidateOnEnvChange to resolver - Details
    • Fix importing node_modules packages in glob resolver with sub-paths - Details
    • Error when external dependencies in libraries have incompatible semver ranges - Details
  • Web Extensions
    • Fix HMR for web extensions - Details
    • Fix web extensions issues with Safari - Details
    • Fix declarative_net_request property in web extension manifest - Details
  • Dev Server
    • Fix browser caching issues with dev server - Details
  • TypeScript
    • Fix path separators on Windows - Details
  • CSS
    • Bump Parcel CSS to fix issues with libc field in package.json - Details
  • Core
    • Fix atomic file writing race condition - Details
    • Bump lmdb dependency to fix multi-threading issue - Details
2.6.0
By Devon Govett • Published on May 25, 2022

Blog post: https://parceljs.org/blog/v2-6-0/

Added

  • Add React error overlay to display pretty runtime errors like Create React App - Details
  • Support for source maps in HMR updates - Details
  • Support for scoping variables in CSS modules - Details
  • Support for custom CSS modules naming patterns - Details
  • Support for node_modules packages in @parcel/resolver-glob - Details
  • Add support for defining compilerOptions in Vue config - Details
  • Add support for Vue 3 <script setup> - Details
  • Add support for gif, tiff, avif, heic, and heif images in @parcel/transformer-image - Details
  • Add support for animated images (i.e. gifs, webp, etc.) in @parcel/transformer-image - Details
  • Support for missing fields in web extensions manifest v3 - Details, Details
  • Improve elm compiler error output - Details
  • Support for useDefineForClassFields option in tsconfig.json - Details
  • Add --hmr-host CLI option to set HMR host independently from dev server - Details

Fixed

  • Update lmdb-js. Fixes Node 18 support - Details, Details
  • Update napi-rs to v2 - Details
  • Fix SWC targets for older browsers - Details
  • Add SWC error handler to fix panic during transpilation - Details
  • Update SWC. Fixes issue with Symbol.toStringTag - Details
  • Bump SWC to fix spreads of imported symbols - Details
  • Correctly emit warnings for unnecessary PostCSS plugins in package.json - Details
  • Fix typo in error message - Details
  • Remove duplicate values in graph APIs when getting connected node ids - Details
  • Fix Pug support in Vue files - Details
  • Fix export declare syntax in generated TypeScript definitions - Details
  • Preserve correct this for named/default imports - Details
  • Fix hoisting for optional chaining member expressions - Details
  • Fix issues with web extensions - Details
  • Reload the closest package.json to an asset if it's a package entry to fix sideEffects - Details
  • Only emit non static import bailout warnings for variables which correspond to a * import - Details
2.5.0
By Devon Govett • Published on April 21, 2022

This release includes new features, including improved Web Extension support and better output for Node.js targets, as well as upgrades to SWC and Parcel CSS, and many bug fixes. Thanks to everyone who contributed!

Added

  • Add support for Web Extension manifest v3 - Details
  • Rewrite __dirname and __filename to refer to the original path when building for Node.js targets - Details
  • Generate codeframe positions for JSON5 - Details
  • Add $schema support in web extension manifest - Details
  • Add support for in expressions with process.env, e.g. 'foo' in process.env - Details

Fixed

  • Updated SWC. - Details + Details
  • Update Parcel CSS to v1.8.1 - Details + Details
  • Fix diagnostic message - Details
  • Disable react refresh for library targets. Fixes "Asset was skipped or not found" error. - Details
  • Don't process inline <style> elements as CSS modules - Details
  • Fix issue with multiple images in srcset attribute - Details
  • Fix peer dependencies - Details + Details
  • Scope hoisting: Fix wrapping when any ancestor asset is wrapped - Details
  • Scope hoisting: Don't insert unused requires that aren't registered anywhere - Details
  • Scope hoisting: Fix wrapped assets importing their own namespace - Details
  • Fix issues with resolving symbols - Details
  • Fix loading .env files when entries are specified using "source" field in package.json - Details
  • Correctly remove orphaned non-tree subgraphs - Details
2.4.1
By Devon Govett • Published on March 31, 2022

This release includes bug fixes.

  • Fix :export in CSS modules
  • Don't remove unused classes or @keyframes when a CSS module is processed by postcss
  • Fix bundling issue with CSS modules where unintended side effects from a different page could be run
  • Fix crash with CSS in multiple environments
  • Update Parcel CSS. Fixes issues with ::-webkit-scrollbar, list styles in CSS modules, @-moz-document, and more. See release notes.
  • Update SWC. Fixes an issue with parenthesized expressions following a return statement.
2.4.0
By Devon Govett • Published on March 22, 2022

This release updates Parcel's default CSS transformer and minifier to use @parcel/css! This offers both improved both build performance and better minification. It also brings automatic transpilation of CSS for your browser targets, just like we have for JavaScript – no configuration needed.

For most projects, this update should be seamless. Read our blog post for more upgrade instructions, and check out the updated CSS docs for full details on all of the new features.

In addition, this release includes several other improvements and bug fixes:

Added

  • Replace typeof before dead code elimination to improve bundle size - Details
  • Human readable file size in bundle analyzer report - Details
  • Improve emoji support detection - Details
  • Enable parsing static class initialization blocks - Details
  • Use PORT environment variable from .env files - Details
  • Use new react-jsx transform in React 16.14.0 - Details
  • Use relative path for bundle labels in bundle analysis - Details
  • Load dynamic imports at higher network priority in non-ESM builds - Details

Fixed

  • Pin lmdb to 2.2.3 - Details
  • Prevent term-size from being bundled - Details
  • Fix cache when non-ascii chars are used in path - Details
  • Bump SWC. Fixes issue with String constructor. - Details
  • Fix DCE with PURE comments - Details
  • Escape double quote of url value in CSS url() - Details
  • Fix documentation comment in API - Details
  • Fix package.json source field resolution with pnpm - Details
  • Fix errors.map is not a function - Details
2.3.2
By Devon Govett • Published on February 18, 2022

This fixes an issue with auto installing node builtins where the npm package has the same name as the node builtin itself. See #7697.

2.3.1
By Devon Govett • Published on February 10, 2022

Followup release to v2.3.0 to improve the error message shown when auto install is disabled (e.g. in CI environments) and a node polyfill is needed. This may occur for example when using automated dependency upgrade bots like renovate/dependabot.

This also fixes a bug where auto install did not work correctly in some cases, and pins all parcel dependency versions so that it is easier to pin parcel to a specific version in your project.

2.3.0
By Devon Govett • Published on February 9, 2022

This release reduces the number of npm dependencies needed by Parcel by over 60%. This builds upon previous work in 2.2.0, so combined Parcel now installs over 70% fewer dependencies! This is accomplished by:

  • Pre-bundling some dependencies with Parcel itself rather than loading them from npm. This is done for packages that are small and internal to Parcel (i.e. you don't interact with them directly in your project). This reduces maintenance burden for users of Parcel.
  • Auto installing node builtin polyfills on demand (e.g. buffer, stream, etc.). These are rarely used but account for a large number of installed dependencies. Now, when you use one of these, or a dependency in your project does, it'll be installed into your project on demand.
  • Removing built-in Babel and PostCSS modules dependencies, and installing them into projects on demand, only when actually used.

We will continue reducing Parcel's footprint in future releases by further reducing our use of dependency-heavy ecosystems such as PostCSS as we replace them with Rust-based equivalents.

Other changes

  • Support React 18 prereleases and experimental versions with automatic JSX runtime - Details
  • Fix @swc/helpers in non-module scripts - Details
  • Fix auto installing dependencies in PNPM monorepos - Details

General

License
MIT
Typescript Types
None found
Tree-shakeable
No

Popularity

GitHub Stargazers
41.4K
Community Interest
42.1K
Number of Forks
2,185

Maintenance

Commits
10/219/22050
Last Commit
Open Issues
690
Closed Issues
4,141
Open Pull Requests
85
Closed Pull Requests
546

Versions

Versions Released
10/219/22025
Latest Version Released
Aug 3, 2022
Current Tags
latest2.7.0
next2.0.0-rc.0
nightly2.0.0-nightly.1158

Dependencies

Dependencies (2)
Dev Dependencies (1)

Contributors

devongovett
devongovett
Commits: 588
wbinnssmith
wbinnssmith
Commits: 494
mischnic
mischnic
Commits: 369
DeMoorJasper
DeMoorJasper
Commits: 260
padmaia
padmaia
Commits: 106
fathyb
fathyb
Commits: 35
gorakong
gorakong
Commits: 26
brandon93s
brandon93s
Commits: 14
101arrowz
101arrowz
Commits: 11
thebriando
thebriando
Commits: 11
thewilkybarkid
thewilkybarkid
Commits: 10
jamiebuilds
jamiebuilds
Commits: 9
AGawrys
AGawrys
Commits: 9
kwelch
kwelch
Commits: 8
shawwn
shawwn
Commits: 7