Skip to content

Commit 3f644f9

Browse files
committed
fix: conflict
2 parents 8c329d2 + da8191a commit 3f644f9

File tree

147 files changed

+3351
-1634
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+3351
-1634
lines changed

.changeset/silver-pumas-tap.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.github/workflows/test-windows.yml

Lines changed: 0 additions & 131 deletions
This file was deleted.

.github/workflows/test-ubuntu.yml renamed to .github/workflows/test.yml

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test (Ubuntu)
1+
name: Test
22

33
# Controls when the action will run.
44
on:
@@ -47,13 +47,17 @@ jobs:
4747
- "!**/dictionary.txt"
4848
4949
# ======== ut ========
50-
ut-ubuntu:
51-
runs-on: ubuntu-latest
50+
ut:
51+
runs-on: ${{ matrix.os }}
5252
needs: changes
5353
if: ${{ needs.changes.outputs.changed == 'true' }}
5454
strategy:
5555
matrix:
56+
os: [ubuntu-latest]
5657
node-version: [18, 20, 22]
58+
include:
59+
- node-version: 18
60+
os: windows-latest
5761

5862
# Steps represent a sequence of tasks that will be executed as part of the job
5963
steps:
@@ -62,6 +66,12 @@ jobs:
6266
with:
6367
fetch-depth: 10
6468

69+
- name: Git config
70+
if: ${{ matrix.os == 'windows-latest' }}
71+
shell: bash
72+
run: |
73+
git config --system core.longpaths true
74+
6575
- name: Install Pnpm
6676
run: corepack enable
6777

@@ -78,16 +88,26 @@ jobs:
7888
run: pnpm run test:unit
7989

8090
# ======== integration && e2e ========
81-
integration-e2e-ubuntu:
82-
runs-on: ubuntu-latest
91+
integration-e2e:
92+
runs-on: ${{ matrix.os }}
8393
needs: changes
8494
if: ${{ needs.changes.outputs.changed == 'true' }}
8595
strategy:
8696
matrix:
97+
os: [ubuntu-latest]
8798
node-version: [18, 20, 22]
99+
include:
100+
- node-version: 18
101+
os: windows-latest
88102

89103
# Steps represent a sequence of tasks that will be executed as part of the job
90104
steps:
105+
- name: Git config
106+
if: ${{ matrix.os == 'windows-latest' }}
107+
shell: bash
108+
run: |
109+
git config --system core.longpaths true
110+
91111
- name: Checkout
92112
uses: actions/checkout@v4
93113
with:
@@ -103,7 +123,7 @@ jobs:
103123
cache: 'pnpm'
104124

105125
- name: Install Dependencies
106-
run: pnpm install && cd ./tests && npx playwright install
126+
run: pnpm install && cd ./tests && pnpm playwright install chromium
107127

108128
- name: Integration Test (Vitest)
109129
run: pnpm run test:integration
@@ -112,11 +132,11 @@ jobs:
112132
run: pnpm run test:e2e
113133

114134
# ======== benchmark ========
115-
benchmark-ubuntu:
135+
benchmark:
116136
# Only Ubuntu 20.04 and 22.04 are supported at the moment.
117137
# See https://github.com/CodSpeedHQ/action/blob/016456b513677f9d4a1c509c7f8a38d8dd55b2b0/.github/workflows/ci.yml#L19.
118138
runs-on: ubuntu-22.04
119-
needs: [integration-e2e-ubuntu]
139+
needs: [integration-e2e]
120140
strategy:
121141
matrix:
122142
node-version: [20]
@@ -138,7 +158,7 @@ jobs:
138158
cache: 'pnpm'
139159

140160
- name: Install Dependencies
141-
run: pnpm install && cd ./tests && npx playwright install
161+
run: pnpm install && cd ./tests && pnpm playwright install chromium
142162

143163
# only run benchmark in Ubuntu
144164
- name: Benchmarks (Vitest)
@@ -151,8 +171,8 @@ jobs:
151171
# ======== exit ========
152172
pr-check-required:
153173
if: (!cancelled() && !failure())
154-
needs: [ut-ubuntu, integration-e2e-ubuntu, benchmark-ubuntu]
174+
needs: [ut, integration-e2e, benchmark]
155175
runs-on: ubuntu-latest
156-
name: Test passed or skipped (Ubuntu)
176+
name: Test passed or skipped
157177
steps:
158-
- run: echo "All tests passed or skipped (Ubuntu)."
178+
- run: echo "All tests passed or skipped."

README.md

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@
1414

1515
Rslib is a library development tool that leverages the well-designed configurations and plugins of [Rsbuild](https://rsbuild.dev), empowering library developers to take advantage of the extensive knowledge and ecosystem of webpack and Rspack.
1616

17-
Rslib provides a comprehensive set of build features for library development, including:
18-
19-
- **Compilation of diverse languages**: TypeScript, JSX, Sass, Less, CSS Modules, Wasm, and more.
20-
- **Flexible build modes**: Bundle and bundleless options to meet varying needs.
21-
- **Multiple output formats**: ESM, CJS, and UMD for maximum compatibility.
22-
- **Declaration file generation**: Including isolated declarations.
23-
- **Advanced features**: Module Federation, asset compression, PostCSS, Lightning CSS, and more.
24-
2517
## ✨ Why Rslib?
2618

2719
In the past, we typically did not use webpack or Rspack to build ESM packages because they often included excessive runtime code, making them less friendly to package consumers. However, the community has developed a vast ecosystem around webpack and Rspack, which provides powerful features like tree shaking, code splitting, module federation and more.
@@ -30,20 +22,26 @@ So we decided to create Rslib. It improves the quality of ESM output from Rspack
3022

3123
![](https://assets.rspack.dev/rsbuild/assets/rspack-stack-layers.png)
3224

33-
## 📍 Roadmap
34-
35-
🚧 Rslib is still in its early stages and under active development. We are building Rslib by working in two main parts:
25+
Rslib is still in its early stages and under active development. We are building Rslib by working in two main parts:
3626

3727
- [bundler support track](https://github.com/web-infra-dev/rslib/issues/45): Improve the quality of ESM / CJS outputs by contributing to Rspack and webpack.
3828
- [Rslib features track](https://github.com/web-infra-dev/rslib/issues/46): Develop the core features of Rslib.
3929

40-
> You can click the link above to check the progress of these tasks. The roadmap may change as we move forward.
30+
The roadmap may change as we move forward.
31+
32+
## 🔥 Features
33+
34+
Rslib has the following features:
4135

42-
We plan to complete the core features of Rslib in Q3 2024 and use Rslib to build our npm packages such as Rspack and Rsbuild (dogfooding). And Rslib will have a public stable version in Q4 2024.
36+
- **Compilation of diverse languages**: TypeScript, JSX, Sass, Less, CSS Modules, Wasm, and more.
37+
- **Flexible build modes**: Bundle and bundleless options to meet varying needs.
38+
- **Multiple output formats**: ESM, CJS, and UMD for maximum compatibility.
39+
- **Declaration file generation**: Including isolated declarations.
40+
- **Advanced features**: Module Federation, asset compression, PostCSS, Lightning CSS, and more.
4341

44-
If you're interested in Rslib, feel free to submit issues or pull requests to help us get there faster.
42+
## 📚 Getting Started
4543

46-
You can also clone the repository and run the examples in the [examples](https://github.com/web-infra-dev/rslib/tree/main/examples) folder to experience Rslib.
44+
To get started with Rslib, see the [Quick Start](https://lib.rsbuild.dev/guide/start/quick-start).
4745

4846
## 🦀 Links
4947

@@ -74,6 +72,40 @@ Please read the [Contributing Guide](https://github.com/web-infra-dev/rslib/blob
7472
<img src="https://contrib.rocks/image?repo=web-infra-dev/rslib&columns=16&max=96"><br/><br/>
7573
</th>
7674
</tr>
75+
<tr>
76+
<td>
77+
<picture>
78+
<source
79+
media="(prefers-color-scheme: dark)"
80+
srcset="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=active&period=past_90_days&owner_id=87694465&repo_ids=766839449&image_size=2x3&color_scheme=dark"
81+
/>
82+
<img
83+
alt="Contributors of web-infra-dev/rslib"
84+
src="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=active&period=past_90_days&owner_id=87694465&repo_ids=766839449&image_size=2x3&color_scheme=light"
85+
/>
86+
</picture>
87+
</td>
88+
<td rowspan="2">
89+
<picture>
90+
<source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/compose-org-participants-growth/thumbnail.png?activity=new&period=past_90_days&owner_id=87694465&repo_ids=766839449&image_size=4x7&color_scheme=dark">
91+
<img alt="New trends of web-infra-dev" src="https://next.ossinsight.io/widgets/official/compose-org-participants-growth/thumbnail.png?activity=new&period=past_90_days&owner_id=87694465&repo_ids=766839449&image_size=4x7&color_scheme=light">
92+
</picture>
93+
</td>
94+
</tr>
95+
<tr>
96+
<td>
97+
<picture>
98+
<source
99+
media="(prefers-color-scheme: dark)"
100+
srcset="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=new&period=past_90_days&owner_id=87694465&repo_ids=766839449&image_size=2x3&color_scheme=dark"
101+
/>
102+
<img
103+
alt="Contributors of web-infra-dev/rslib"
104+
src="https://next.ossinsight.io/widgets/official/compose-org-active-contributors/thumbnail.png?activity=new&period=past_90_days&owner_id=87694465&repo_ids=766839449&image_size=2x3&color_scheme=light"
105+
/>
106+
</picture>
107+
</td>
108+
</tr>
77109
</table>
78110
</a>
79111

@@ -96,6 +128,8 @@ Some of the implementations of Rslib have drawn inspiration from outstanding pro
96128
- [esbuild](https://github.com/evanw/esbuild), created by [Evan Wallace](https://github.com/evanw).
97129
- [tsup](https://github.com/egoist/tsup), created by [EGOIST](https://github.com/egoist).
98130

131+
This Rslib website is powered by [Netlify](https://www.netlify.com/).
132+
99133
## 📖 License
100134

101135
Rslib is licensed under the [MIT License](https://github.com/web-infra-dev/rslib/blob/main/LICENSE).

examples/express-plugin/rslib.config.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,19 @@
11
import { defineConfig } from '@rslib/core';
22

3-
const shared = {
4-
dts: {
5-
bundle: false,
6-
},
7-
};
8-
93
export default defineConfig({
104
lib: [
115
{
12-
...shared,
136
format: 'esm',
7+
dts: true,
148
output: {
159
distPath: {
1610
root: './dist/esm',
1711
},
1812
},
1913
},
2014
{
21-
...shared,
2215
format: 'cjs',
16+
dts: true,
2317
output: {
2418
distPath: {
2519
root: './dist/cjs',

0 commit comments

Comments
 (0)