Skip to content

Commit e10fa94

Browse files
authored
feat: migrate rspack-compat examples (#97)
1 parent cd67104 commit e10fa94

File tree

41 files changed

+503
-1
lines changed

Some content is hidden

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

41 files changed

+503
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: actions/checkout@v4
2121

2222
- name: Install pnpm
23-
uses: pnpm/action-setup@v2
23+
uses: pnpm/action-setup@v4
2424
id: pnpm-install
2525

2626
- name: Set up Node.js
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "example-case-sensitive-paths-webpack-plugin",
3+
"private": true,
4+
"scripts": {
5+
"dev": "rspack serve",
6+
"build": "rspack build || echo 'make-ci-happy'"
7+
},
8+
"devDependencies": {
9+
"@rspack/cli": "^1.0.0-alpha.0",
10+
"@rspack/core": "^1.0.0-alpha.0",
11+
"case-sensitive-paths-webpack-plugin": "2.4.0"
12+
}
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const { defineConfig } = require('@rspack/cli');
2+
const CaseSensitivePlugin = require('case-sensitive-paths-webpack-plugin');
3+
4+
module.exports = defineConfig({
5+
plugins: [new CaseSensitivePlugin()],
6+
});
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
console.log('answer');
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import { answer } from './Answer';
2+
console.log('answer', answer);
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "example-copy-webpack-plugin_5",
3+
"private": true,
4+
"scripts": {
5+
"dev": "rspack serve",
6+
"build": "rspack build"
7+
},
8+
"devDependencies": {
9+
"@rspack/cli": "^1.0.0-alpha.0",
10+
"copy-webpack-plugin": "^5.1.2"
11+
}
12+
}

rspack/copy-webpack-plugin@5/public/test.txt

Whitespace-only changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
const { defineConfig } = require('@rspack/cli');
2+
const CopyPlugin = require('copy-webpack-plugin');
3+
4+
module.exports = defineConfig({
5+
plugins: [
6+
new CopyPlugin([
7+
{
8+
from: 'public',
9+
dist: '.',
10+
},
11+
]),
12+
],
13+
});
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function main() {
2+
return 'hello world';
3+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"name": "example-fork-ts-checker-webpack-plugin_8",
3+
"private": true,
4+
"scripts": {
5+
"dev": "rspack serve",
6+
"build": "rspack build || echo 'make-ci-happy'"
7+
},
8+
"devDependencies": {
9+
"@rspack/cli": "^1.0.0-alpha.0",
10+
"fork-ts-checker-webpack-plugin": "^8.0.0",
11+
"typescript": "^5.3.3"
12+
}
13+
}

0 commit comments

Comments
 (0)