Skip to content

Commit

Permalink
chore: fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-n-a committed Jan 3, 2024
1 parent 3627615 commit b0751d9
Show file tree
Hide file tree
Showing 27 changed files with 147 additions and 83 deletions.
3 changes: 2 additions & 1 deletion diffcases/arco-pro/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ const config = {
// See also <https://github.com/search?q=repo%3Aswc-project%2Fswc+parser+stack+overflow&type=issues>
mockjs: require.resolve("./patches/mock.js"),
"@swc/helpers": require.resolve("@swc/helpers")
}
},
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
output: {
publicPath: "/",
Expand Down
3 changes: 2 additions & 1 deletion examples/arco-pro/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ const config = {
// Alias to the unminified version mitigates this problem.
// See also <https://github.com/search?q=repo%3Aswc-project%2Fswc+parser+stack+overflow&type=issues>
mockjs: require.resolve("./patches/mock.js")
}
},
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
output: {
publicPath: "/",
Expand Down
3 changes: 2 additions & 1 deletion examples/basic-ts/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const rspack = require("@rspack/core");
const config = {
entry: "./src/index.ts",
resolve: {
tsConfigPath: path.resolve(__dirname, "tsconfig.json")
tsConfigPath: path.resolve(__dirname, "tsconfig.json"),
extensions: ["...", ".ts"]
},
plugins: [
new rspack.HtmlRspackPlugin({
Expand Down
5 changes: 4 additions & 1 deletion examples/builtin-swc-loader/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const config = {
entry: {
main: "./src/index.jsx"
},
resolve: {
extensions: ["...", ".jsx"]
},
module: {
rules: [
{
Expand Down Expand Up @@ -41,7 +44,7 @@ const config = {
]
},
optimization: {
minimize: false, // Disabling minification because it takes too long on CI
minimize: false // Disabling minification because it takes too long on CI
},
plugins: [
new rspack.HtmlRspackPlugin({
Expand Down
3 changes: 3 additions & 0 deletions examples/cra-ts/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const config = {
entry: {
main: "./src/index.tsx"
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
3 changes: 3 additions & 0 deletions examples/cra/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const config = {
entry: {
main: "./src/index.jsx"
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
optimization: {
minimize: false // Disabling minification because it takes too long on CI
},
Expand Down
5 changes: 4 additions & 1 deletion examples/emotion/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ const config = {
main: "./src/index.jsx"
},
optimization: {
minimize: false, // Disabling minification because it takes too long on CI
minimize: false // Disabling minification because it takes too long on CI
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
plugins: [
new rspack.HtmlRspackPlugin({
Expand Down
3 changes: 3 additions & 0 deletions examples/express/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const config = {
entry: {
main: ["webpack/hot/poll?100", "./src/main.ts"]
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
7 changes: 5 additions & 2 deletions examples/loader-compat/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ const config = {
},
target: "node",
externalsType: "commonjs",
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down Expand Up @@ -130,7 +133,7 @@ const config = {
]
},
optimization: {
minimize: false, // Disabling minification because it takes too long on CI
},
minimize: false // Disabling minification because it takes too long on CI
}
};
module.exports = config;
3 changes: 3 additions & 0 deletions examples/nestjs/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const config = {
entry: {
main: ["webpack/hot/poll?100", "./src/main.ts"]
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
5 changes: 4 additions & 1 deletion examples/react-15-classic/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const config = {
entry: {
main: "./src/index.jsx"
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand All @@ -30,7 +33,7 @@ const config = {
]
},
optimization: {
minimize: false, // Disabling minification because it takes too long on CI
minimize: false // Disabling minification because it takes too long on CI
},
plugins: [
new rspack.HtmlRspackPlugin({
Expand Down
3 changes: 3 additions & 0 deletions examples/react-15/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const config = {
entry: {
main: "./src/index.jsx"
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
3 changes: 3 additions & 0 deletions examples/react-refresh-babel-loader/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const config = {
optimization: {
minimize: false // Disabling minification because it takes too long on CI
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
3 changes: 3 additions & 0 deletions examples/react-refresh/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const config = {
mode: isProduction ? "production" : "development",
entry: { main: "./src/index.tsx" },
devtool: "source-map",
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
3 changes: 3 additions & 0 deletions examples/react-storybook/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ module.exports = {
optimization: {
minimize: false // Disabling minification because it takes too long on CI
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
3 changes: 3 additions & 0 deletions examples/react-with-less/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const config = {
entry: {
main: ["./src/index.jsx"]
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
3 changes: 3 additions & 0 deletions examples/react-with-sass/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const config = {
entry: {
main: ["./src/index.jsx"]
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
3 changes: 3 additions & 0 deletions examples/react/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const config = {
entry: {
main: "./src/index.jsx"
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
5 changes: 4 additions & 1 deletion examples/solid/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ const config = {
entry: {
main: "./src/index.jsx"
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down Expand Up @@ -34,7 +37,7 @@ const config = {
]
},
optimization: {
minimize: false, // Disabling minification because it takes too long on CI
minimize: false // Disabling minification because it takes too long on CI
},
plugins: [
new rspack.HtmlRspackPlugin({
Expand Down
3 changes: 3 additions & 0 deletions examples/styled-components/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ const config = {
optimization: {
minimize: false // Disabling minification because it takes too long on CI
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
3 changes: 3 additions & 0 deletions examples/svgr/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ const config = {
entry: {
main: "./index.jsx"
},
resolve: {
extensions: ["...", ".ts", ".tsx", ".jsx"]
},
module: {
rules: [
{
Expand Down
2 changes: 1 addition & 1 deletion examples/vue2-ts/rspack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const config = {
})
],
resolve: {
extensions: [".vue", "..."]
extensions: [".vue", ".ts", "..."]
},
module: {
rules: [
Expand Down
Loading

0 comments on commit b0751d9

Please sign in to comment.