
Rspack Has a Free API: The Webpack-Compatible Bundler That's 10x Faster
Your webpack build takes 60 seconds. Rspack does the same in 6 seconds. Same config. Same plugins. What Is Rspack? Rspack is a Rust-based JavaScript bundler that's compatible with webpack's ecosystem. Same configuration format, same plugin API, same loaders — but 5-10x faster. // rspack.config.js — looks exactly like webpack.config.js module . exports = { entry : ' ./src/index.js ' , output : { path : ' ./dist ' , filename : ' bundle.js ' }, module : { rules : [ { test : / \. tsx ? $/ , use : ' builtin:swc-loader ' }, { test : / \. css$/ , use : [ ' style-loader ' , ' css-loader ' ] }, { test : / \.( png|jpg ) $/ , type : ' asset ' } ] }, plugins : [ new rspack . HtmlRspackPlugin ({ template : ' ./index.html ' })] } Migration from webpack // package.json { "scripts": { - "build": "webpack", - "dev": "webpack serve" + "build": "rspack build", + "dev": "rspack serve" }, "devDependencies": { - "webpack": "^5.0.0", - "webpack-cli": "^5.0.0", + "@rspack/cli": "^1.0.0", } } Rename webpack.co
Continue reading on Dev.to JavaScript
Opens in a new tab


