Comments (2)
I tested it on rspack@alpha
without problems. rsbuild may encapsulate some configurations that need to be configured manually if using rspack directly. Here is an example:
const path = require("node:path");
/**
* @type {import('webpack').Configuration | import('@rspack/cli').Configuration}
*/
module.exports = {
mode: "development",
entry: "./src/index.tsx",
resolve: {
extensions: [".ts"],
tsConfig: path.resolve(__dirname, "tsconfig.json"),
},
module: {
rules: [
{
test: /\.(j|t)sx?$/,
exclude: [/[\\/]node_modules[\\/]/],
loader: "builtin:swc-loader",
options: {
sourceMap: false,
jsc: {
parser: {
syntax: "typescript",
},
externalHelpers: true,
transform: {
react: {
runtime: "automatic",
development: true,
},
},
},
},
},
],
},
};
from rspack.
For rspack before 1.0.0:
resolve: {
tsConfig: {
configFile: path.resolve(__dirname, "tsconfig.json")
},
}
from rspack.
Related Issues (20)
- [Bug]: Panic occurred at runtime `[email protected]` HOT 3
- [Bug]: production build with mjs empty module results in error
- [Bug]: Removing CSS File while runnning `npm run dev` results in compile error HOT 1
- [Feature]: Module.addBlock API HOT 1
- [Tracking]: enable biome lint and format rules HOT 1
- [Bug]: `html-rspack-plugin` child compilation fail when used with `case-sensitive-paths-webpack-plugin` HOT 2
- [Bug]: Panic occurred at runtime HOT 3
- [Bug]: webpackMissingModule with relative import HOT 3
- [Bug]: 也更新后报错 HOT 1
- [Bug]: Some `output.copy` glob patterns fail
- [Bug]: should have dependency id HOT 21
- [Bug]: plugin compiles fine in webpack, but does not work in rspack HOT 2
- [Feature]: Add chunks raised for imports in third-party npm packages, which need to be captured in ouput.chunkFilename HOT 2
- [Tracking]: JS -> TS refactor the remaining .js file to .ts and esm HOT 1
- [Bug]: HMR update not found
- [Bug]: Panic occured at runtime. HOT 1
- [Bug Report]: css-loader errors occurred while using tailwindcss. HOT 2
- JavaScript parsing error: Expression expected HOT 2
- [Bug]: `webpack-test/statsCases/runtime-specific-used-exports` randomly panics
- [Bug]: module federation plugin makes dev/build/HMR a lot slower
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rspack.