Skip to content

Commit 275c1f4

Browse files
authored
CommonJS to target ES2019 (#108)
* CommonJS to target ES2019 * Update PR number
1 parent 2c63489 commit 275c1f4

File tree

2 files changed

+26
-9
lines changed

2 files changed

+26
-9
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Changed
11+
12+
- Changed ECMAScript target version, by [@compulim](https://github.com/compulim), in PR [#108](https://github.com/compulim/react-chain-of-responsibility/pull/108)
13+
- CommonJS will target ES2019, changed from ESNext, will support Webpack 4
14+
- ES Modules will continue to target ESNext
15+
816
## [0.4.0] - 2025-10-22
917

1018
### Added
Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
import { defineConfig } from 'tsup';
1+
import { defineConfig, type Options } from 'tsup';
2+
3+
const BASE_CONFIG: Options = {
4+
dts: true,
5+
entry: {
6+
'react-chain-of-responsibility': './src/index.ts',
7+
'react-chain-of-responsibility.fluentUI': './src/index.fluentUI.ts',
8+
'react-chain-of-responsibility.preview': './src/index.preview.ts'
9+
},
10+
sourcemap: true
11+
};
212

313
export default defineConfig([
414
{
5-
dts: true,
6-
entry: {
7-
'react-chain-of-responsibility': './src/index.ts',
8-
'react-chain-of-responsibility.fluentUI': './src/index.fluentUI.ts',
9-
'react-chain-of-responsibility.preview': './src/index.preview.ts'
10-
},
11-
format: ['cjs', 'esm'],
12-
sourcemap: true,
15+
...BASE_CONFIG,
16+
format: ['esm'],
1317
target: 'esnext'
18+
},
19+
{
20+
...BASE_CONFIG,
21+
format: ['cjs'],
22+
target: 'es2019'
1423
}
1524
]);

0 commit comments

Comments
 (0)