Repository navigation
v6.0.0
✨ Features
Add support for ES6 imports on all processes. 🎉
Main and preload files are now compiled even in development, which means CJS require can now be replaced ES6 import on the files of these processes. In order for this to work, main and preload paths have to point to the built files.
package.json
{
"main": "build/static/js/electron.main.js",
}Main file
Since the preload file(s) will be compiled both in development and production, you can use a single path for both environment. Built files use the names declared in the configuration file: electron.preload.[name].js
new BrowserWindow({
webPreferences: {
// With a preload entry key named `app`
preload: path.join(__dirname, "electron.preload.app.js"),
}
});💥 Breaking changes
Remove support for ESM.
On the previous version, ESM was only supported thanks to a workaround (because I couldn't figure out how to configure webpack and SWC correctly) allowing the ESM equivalent of __dirname to be compiled as a dynamic path . Now that import can be used without ESM, this workaround was removed and so CJS __dirname must be available.
Rebuiltron configuration file must now have the extension .js instead of .cjs.
rebuiltron.config.cjs ---> rebuiltron.config.js
📦 Dependencies
- Remove
string-replace-loader - Update
@pmmmwh/react-refresh-webpack-pluginto0.5.15(patch) - Update
@swc/coreto1.7.26(minor) - Update
browserslistto4.23.3(patch) - Update
css-loaderto7.1.2(patch) - Update
css-minimizer-webpack-pluginto7.0.0(major) - Update
detect-portto1.6.1(minor) - Update
eslint-config-arklintto1.11.0(minor) - Update
mini-css-extract-pluginto2.9.1(patch) - Update
postcss-normalizeto13.0.0(major) - Update
postcss-preset-envto10.0.3(major) - Update
react-refreshto0.14.2(patch) - Update
sass-loaderto16.0.1(major) - Update
webpackto5.94.0(minor) - Update
webpack-dev-serverto5.1.0(minor)