Skip to content

Commit 40da44a

Browse files
authored
refactor(create-rstack): align library templates with Rslib (#377)
1 parent c41cdea commit 40da44a

18 files changed

Lines changed: 17 additions & 74 deletions

File tree

packages/create-rstack/template-lib-node-ts/rstack.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import { define } from 'rstack';
33

44
define.lib({
5-
syntax: ['node 22'],
65
dts: true,
76
});
87

packages/create-rstack/template-lib-node/package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
"version": "0.0.0",
44
"sideEffects": false,
55
"type": "module",
6-
"exports": {
7-
".": {
8-
"default": "./dist/index.js"
9-
}
10-
},
6+
"exports": "./dist/index.js",
117
"files": [
128
"dist",
139
"README.md"

packages/create-rstack/template-lib-node/rstack.config.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
// Configuration guide: https://rstack.rs/config
33
import { define } from 'rstack';
44

5-
define.lib({
6-
syntax: ['node 22'],
7-
});
5+
define.lib({});
86

97
define.lint(({ js, rstestPlugin }) => [
108
js.configs.recommended,

packages/create-rstack/template-lib-react-ts/rstack.config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ define.lib(async () => {
66
return {
77
bundle: false,
88
dts: true,
9-
source: {
10-
entry: {
11-
index: ['./src/**'],
12-
},
13-
},
149
output: {
1510
target: 'web',
1611
},

packages/create-rstack/template-lib-react/package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
"name": "rstack-lib-react",
33
"version": "0.0.0",
44
"type": "module",
5-
"exports": {
6-
".": {
7-
"default": "./dist/index.js"
8-
}
9-
},
5+
"exports": "./dist/index.js",
106
"files": [
117
"dist",
128
"README.md"

packages/create-rstack/template-lib-react/rstack.config.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ define.lib(async () => {
66
const { pluginReact } = await import('@rsbuild/plugin-react');
77
return {
88
bundle: false,
9-
source: {
10-
entry: {
11-
index: ['./src/**'],
12-
},
13-
},
149
output: {
1510
target: 'web',
1611
},

packages/create-rstack/template-lib-solid-ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"type": "module",
55
"exports": {
66
".": {
7-
"solid": "./dist/index.jsx",
87
"types": "./dist/index.d.ts",
8+
"solid": "./dist/index.jsx",
99
"default": "./dist/index.js"
1010
}
1111
},

packages/create-rstack/template-lib-solid-ts/rstack.config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ define.lib(async () => {
88
lib: [
99
{
1010
id: 'compiled',
11-
bundle: false,
1211
dts: true,
1312
plugins: [
1413
pluginBabel({
@@ -19,7 +18,6 @@ define.lib(async () => {
1918
},
2019
{
2120
id: 'source',
22-
bundle: false,
2321
output: {
2422
filename: {
2523
js: '[name].jsx',
@@ -48,11 +46,7 @@ define.lib(async () => {
4846
},
4947
},
5048
],
51-
source: {
52-
entry: {
53-
index: ['./src/**'],
54-
},
55-
},
49+
bundle: false,
5650
output: {
5751
target: 'web',
5852
},

packages/create-rstack/template-lib-solid/rstack.config.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ define.lib(async () => {
99
lib: [
1010
{
1111
id: 'compiled',
12-
bundle: false,
1312
plugins: [
1413
pluginBabel({
1514
include: /\.(?:jsx|tsx)$/,
@@ -19,7 +18,6 @@ define.lib(async () => {
1918
},
2019
{
2120
id: 'source',
22-
bundle: false,
2321
output: {
2422
filename: {
2523
js: '[name].jsx',
@@ -48,11 +46,7 @@ define.lib(async () => {
4846
},
4947
},
5048
],
51-
source: {
52-
entry: {
53-
index: ['./src/**'],
54-
},
55-
},
49+
bundle: false,
5650
output: {
5751
target: 'web',
5852
},

packages/create-rstack/template-lib-svelte-ts/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
".": {
77
"types": "./dist/index.d.ts",
88
"default": "./dist/index.js"
9-
}
9+
},
10+
"./style.css": "./dist/index.css"
1011
},
1112
"types": "./dist/index.d.ts",
1213
"files": [

0 commit comments

Comments
 (0)