Skip to content

Commit

Permalink
release(rax): v1.2.2 compat react bundle path (#2231)
Browse files Browse the repository at this point in the history
* chore: revert change

* chore: bump version

* chore: bump version

* chore: add comment
  • Loading branch information
SoloJiang committed Sep 2, 2021
1 parent aef8c54 commit 025282d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/rax/CHANGELOG.md
@@ -1,5 +1,9 @@
## CHANGELOG

### 1.2.2

- fix: `lib/compat` bundle error path

### 1.2.1

- refactor: change output result format, avoid mixing `IIFE` and `CJS`
Expand Down
2 changes: 1 addition & 1 deletion packages/rax/package.json
@@ -1,6 +1,6 @@
{
"name": "rax",
"version": "1.2.1",
"version": "1.2.2",
"description": "A universal React-compatible render engine.",
"license": "BSD-3-Clause",
"main": "index.js",
Expand Down
4 changes: 3 additions & 1 deletion scripts/dist-core.js
Expand Up @@ -176,12 +176,14 @@ buildCorePackages({
});

// Build rax compat react version to rax/lib/compat/index.js
// It needs external ../../index, which won't bundle rax into lib/compat/index.js
// If bundle rax into lib/compat/index.js, it will exist multiple version rax in the project with rax and react are used together
build({
packageName: 'rax',
name: 'Rax',
entry: 'src/compat/index.js',
outputPath: './packages/rax/lib/compat/index.js',
format: CJS,
external: ['rax-children', 'rax-is-valid-element', 'rax-create-factory', 'rax-clone-element'],
external: ['../../index', 'rax-children', 'rax-is-valid-element', 'rax-create-factory', 'rax-clone-element'],
replaceValues: { 'process.env.RAX_VERSION': raxVersion },
});

0 comments on commit 025282d

Please sign in to comment.