Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import { define } from 'rstack';

define.lib({
syntax: ['node 22'],
dts: true,
});

Expand Down
6 changes: 1 addition & 5 deletions packages/create-rstack/template-lib-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@
"version": "0.0.0",
"sideEffects": false,
"type": "module",
"exports": {
".": {
"default": "./dist/index.js"
}
},
"exports": "./dist/index.js",
"files": [
"dist",
"README.md"
Expand Down
4 changes: 1 addition & 3 deletions packages/create-rstack/template-lib-node/rstack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
// Configuration guide: https://rstack.rs/config
import { define } from 'rstack';

define.lib({
syntax: ['node 22'],
});
define.lib({});

define.lint(({ js, rstestPlugin }) => [
js.configs.recommended,
Expand Down
5 changes: 0 additions & 5 deletions packages/create-rstack/template-lib-react-ts/rstack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ define.lib(async () => {
return {
bundle: false,
dts: true,
source: {
entry: {
index: ['./src/**'],
},
},
output: {
target: 'web',
},
Expand Down
6 changes: 1 addition & 5 deletions packages/create-rstack/template-lib-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
"name": "rstack-lib-react",
"version": "0.0.0",
"type": "module",
"exports": {
".": {
"default": "./dist/index.js"
}
},
"exports": "./dist/index.js",
"files": [
"dist",
"README.md"
Expand Down
5 changes: 0 additions & 5 deletions packages/create-rstack/template-lib-react/rstack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ define.lib(async () => {
const { pluginReact } = await import('@rsbuild/plugin-react');
return {
bundle: false,
source: {
entry: {
index: ['./src/**'],
},
},
output: {
target: 'web',
},
Expand Down
2 changes: 1 addition & 1 deletion packages/create-rstack/template-lib-solid-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"type": "module",
"exports": {
".": {
"solid": "./dist/index.jsx",
"types": "./dist/index.d.ts",
"solid": "./dist/index.jsx",
"default": "./dist/index.js"
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ define.lib(async () => {
lib: [
{
id: 'compiled',
bundle: false,
dts: true,
plugins: [
pluginBabel({
Expand All @@ -19,7 +18,6 @@ define.lib(async () => {
},
{
id: 'source',
bundle: false,
output: {
filename: {
js: '[name].jsx',
Expand Down Expand Up @@ -48,11 +46,7 @@ define.lib(async () => {
},
},
],
source: {
entry: {
index: ['./src/**'],
},
},
bundle: false,
output: {
target: 'web',
},
Expand Down
8 changes: 1 addition & 7 deletions packages/create-rstack/template-lib-solid/rstack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ define.lib(async () => {
lib: [
{
id: 'compiled',
bundle: false,
plugins: [
pluginBabel({
include: /\.(?:jsx|tsx)$/,
Expand All @@ -19,7 +18,6 @@ define.lib(async () => {
},
{
id: 'source',
bundle: false,
output: {
filename: {
js: '[name].jsx',
Expand Down Expand Up @@ -48,11 +46,7 @@ define.lib(async () => {
},
},
],
source: {
entry: {
index: ['./src/**'],
},
},
bundle: false,
output: {
target: 'web',
},
Expand Down
3 changes: 2 additions & 1 deletion packages/create-rstack/template-lib-svelte-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
".": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
}
},
"./style.css": "./dist/index.css"
},
"types": "./dist/index.d.ts",
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import { svelteDtsPlugin } from './scripts/rslib-plugin-svelte-dts.ts';
define.lib(async () => {
const { pluginSvelte } = await import('@rsbuild/plugin-svelte');
return {
bundle: false,
source: {
entry: {
index: ['./src/**'],
},
},
output: {
target: 'web',
},
Expand Down
5 changes: 2 additions & 3 deletions packages/create-rstack/template-lib-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@
"version": "0.0.0",
"type": "module",
"exports": {
".": {
"default": "./dist/index.js"
}
".": "./dist/index.js",
"./style.css": "./dist/index.css"
},
"files": [
"dist",
Expand Down
6 changes: 0 additions & 6 deletions packages/create-rstack/template-lib-svelte/rstack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ import { define } from 'rstack';
define.lib(async () => {
const { pluginSvelte } = await import('@rsbuild/plugin-svelte');
return {
bundle: false,
source: {
entry: {
index: ['./src/**'],
},
},
output: {
target: 'web',
},
Expand Down
5 changes: 0 additions & 5 deletions packages/create-rstack/template-lib-vue-ts/rstack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ define.lib(async () => {
const { pluginVue } = await import('@rsbuild/plugin-vue');
return {
bundle: false,
source: {
entry: {
index: ['./src/**'],
},
},
output: {
target: 'web',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ test('The button should have correct background color', () => {
label: 'Demo Button',
},
});
expect(wrapper.get('button').element).toHaveStyle({
const button = wrapper.get('button');
expect(button.text()).toBe('Demo Button');
expect(button.element).toHaveStyle({
backgroundColor: '#ccc',
});
wrapper.unmount();
});
6 changes: 1 addition & 5 deletions packages/create-rstack/template-lib-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
"name": "rstack-lib-vue",
"version": "0.0.0",
"type": "module",
"exports": {
".": {
"default": "./dist/index.js"
}
},
"exports": "./dist/index.js",
"files": [
"dist",
"README.md"
Expand Down
5 changes: 0 additions & 5 deletions packages/create-rstack/template-lib-vue/rstack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@ define.lib(async () => {
const { pluginVue } = await import('@rsbuild/plugin-vue');
return {
bundle: false,
source: {
entry: {
index: ['./src/**'],
},
},
output: {
target: 'web',
},
Expand Down
5 changes: 3 additions & 2 deletions packages/create-rstack/template-lib-vue/tests/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ test('The button should have correct background color', () => {
label: 'Demo Button',
},
});
expect(wrapper.get('button').element).toHaveStyle({
const button = wrapper.get('button');
expect(button.text()).toBe('Demo Button');
expect(button.element).toHaveStyle({
backgroundColor: '#ccc',
});
wrapper.unmount();
});