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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "rstack-examples",
"version": "1.0.0",
"type": "module",
"description": "Repository for examples of rstack",
"license": "MIT",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion rsbuild/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"build": "rsbuild build",
"dev": "node ./server.mjs",
"dev": "node ./server.js",
"preview": "rsbuild preview"
},
"devDependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion rsbuild/fastify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"build": "rsbuild build",
"dev": "node ./server.mjs",
"dev": "node ./server.js",
"preview": "rsbuild preview"
},
"devDependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions rsbuild/ssr-express-with-manifest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"type": "module",
"scripts": {
"build": "rsbuild build",
"dev": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" node ./server.mjs",
"preview": "node ./prod-server.mjs"
"dev": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" node ./server.js",
"preview": "node ./prod-server.js"
},
"dependencies": {
"react": "^19.2.7",
Expand Down
4 changes: 2 additions & 2 deletions rsbuild/ssr-express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"type": "module",
"scripts": {
"build": "rsbuild build",
"dev": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" node ./server.mjs",
"preview": "node ./prod-server.mjs"
"dev": "cross-env NODE_OPTIONS=\"--experimental-vm-modules --no-warnings\" node ./server.js",
"preview": "node ./prod-server.js"
},
"dependencies": {
"react": "^19.2.7",
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions rsdoctor/rspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rsdoctor-example/rspack",
"version": "0.1.1",
"private": true,
"type": "module",
"scripts": {
"build": "NODE_ENV=production rspack build",
"build:analysis": "RSDOCTOR=true NODE_ENV=production rspack build",
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions rslib/module-federation/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@rslib-example/module-federation",
"private": true,
"type": "module",
"scripts": {
"build:lib": "pnpm --filter rslib-mf-react-component run build",
"dev:all:host": "pnpm dev:host & pnpm dev:mf & pnpm dev:remote",
Expand Down
1 change: 1 addition & 0 deletions rspack/basic-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/basic-ts",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions rspack/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/basic",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
Expand Down
10 changes: 10 additions & 0 deletions rspack/basic/rspack.config.mjs → rspack/basic/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { rspack } from '@rspack/core';
import { defineConfig } from '@rspack/cli';

export default defineConfig({
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
],
},
entry: './src/index.js',
plugins: [
new rspack.HtmlRspackPlugin({
Expand Down
1 change: 1 addition & 0 deletions rspack/builtin-swc-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/builtin-swc-loader",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ export default defineConfig({
},
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
{
test: /\.css$/,
type: 'css',
Expand Down
1 change: 1 addition & 0 deletions rspack/bundle-splitting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/bundle-splitting",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ export default defineConfig({
main: './index.js',
},
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
],
parser: {
asset: {
dataUrlCondition: {
Expand Down
1 change: 1 addition & 0 deletions rspack/case-sensitive-paths-webpack-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@rspack-example/case-sensitive-paths-webpack-plugin",
"private": true,
"type": "module",
"scripts": {
"build": "rspack build || echo 'make-ci-happy'",
"dev": "rspack dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,15 @@ import { defineConfig } from '@rspack/cli';
import CaseSensitivePlugin from 'case-sensitive-paths-webpack-plugin';

export default defineConfig({
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
],
},
plugins: [new CaseSensitivePlugin()],
});
1 change: 1 addition & 0 deletions rspack/code-splitting/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/code-splitting",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { rspack } from '@rspack/core';
import { defineConfig } from '@rspack/cli';

export default defineConfig({
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
],
},
entry: {
main: './index.js',
},
Expand Down
1 change: 1 addition & 0 deletions rspack/common-libs/lib1/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "lib1",
"version": "1.0.0",
"type": "module",
"main": "dist/index.js",
"source": "src/index.ts",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions rspack/common-libs/lib1/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
"outDir": "dist",
"rootDir": "src",
"paths": {
Expand Down
1 change: 1 addition & 0 deletions rspack/common-libs/lib2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "lib2",
"version": "1.0.0",
"type": "module",
"main": "dist/index.js",
"source": "src/index.ts",
"scripts": {
Expand Down
2 changes: 2 additions & 0 deletions rspack/common-libs/lib2/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "Bundler",
"outDir": "dist",
"rootDir": "src",
"paths": {
Expand Down
1 change: 1 addition & 0 deletions rspack/common-libs/lib3/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "lib3",
"version": "1.0.0",
"type": "module",
"main": "src/index.js",
"license": "MIT"
}
1 change: 1 addition & 0 deletions rspack/cra-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/cra-app-ts",
"version": "0.1.1",
"private": true,
"type": "module",
"scripts": {
"build": "rspack build",
"dev": "rspack dev"
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions rspack/cra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/cra-app",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"build": "rspack build",
"dev": "rspack dev"
Expand Down
6 changes: 6 additions & 0 deletions rspack/cra/rspack.config.mjs → rspack/cra/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ export default defineConfig({
},
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
{
test: /\.css$/,
type: 'css',
Expand Down
1 change: 1 addition & 0 deletions rspack/css-chunking-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/css-chunking-plugin",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ export default defineConfig({
entry: './src/index.js',
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
{
test: /\.css$/,
type: 'css',
Expand Down
1 change: 1 addition & 0 deletions rspack/css-parser-generator-options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/css-parser-generator-options",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
Expand Down
1 change: 1 addition & 0 deletions rspack/dll-reference/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@rspack-example/dll-reference-plugin",
"private": true,
"type": "module",
"scripts": {
"build": "rspack build || echo 'make-ci-happy'",
"dev": "rspack dev"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ import { defineConfig } from '@rspack/cli';
import { rspack } from '@rspack/core';

export default defineConfig({
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
],
},
entry: './index',
output: {
path: path.resolve(import.meta.dirname, 'dist'),
Expand Down
1 change: 1 addition & 0 deletions rspack/dll/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "@rspack-example/dll-plugin",
"private": true,
"type": "module",
"scripts": {
"build": "rspack build || echo 'make-ci-happy'",
"dev": "rspack dev"
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions rspack/emotion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/emotion",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
Expand Down
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion rspack/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@
"name": "@rspack-example/eslint",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
"dev": "rspack serve -c",
"dev:loader": "rspack serve -c rspack.config.loader.mjs"
"dev:loader": "rspack serve -c rspack.config.loader.js"
},
"devDependencies": {
"@rspack/cli": "2.1.4",
Expand Down
10 changes: 10 additions & 0 deletions rspack/eslint/rspack.config.mjs → rspack/eslint/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@ import { defineConfig } from '@rspack/cli';
import EslintPlugin from 'eslint-rspack-plugin';

export default defineConfig({
module: {
rules: [
{
test: /\.[cm]?[jt]sx?$/,
resolve: {
fullySpecified: false,
},
},
],
},
context: import.meta.dirname,
entry: {
main: './src/index.js',
Expand Down
1 change: 1 addition & 0 deletions rspack/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/express",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "cross-env BUILD=true rspack build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export default defineConfig({
entry: {
main: ['@rspack/core/hot/poll?100', './src/main.ts'],
},
output: {
filename: '[name].cjs',
},
resolve: {
extensions: ['...', '.ts', '.tsx', '.jsx'],
},
Expand Down Expand Up @@ -39,7 +42,7 @@ export default defineConfig({
plugins: [
!process.env.BUILD &&
new RunScriptWebpackPlugin({
name: 'main.js',
name: 'main.cjs',
autoRestart: false,
}),
],
Expand Down
1 change: 1 addition & 0 deletions rspack/extract-license/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@rspack-example/extract-license",
"version": "1.0.0",
"private": true,
"type": "module",
"license": "MIT",
"scripts": {
"build": "rspack build",
Expand Down
Loading
Loading