rebuiltron 4.0.1 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -4
- package/configurations/base.js +2 -2
- package/helpers/paths.js +1 -2
- package/loaders/javascript.js +1 -1
- package/loaders/style.js +1 -1
- package/package.json +1 -1
- package/rebuiltronConfig.js +1 -2
- package/webpackDevServer.config.js +1 -1
package/README.md
CHANGED
|
@@ -44,8 +44,6 @@ Rebuiltron expects the following folder structure:
|
|
|
44
44
|
|
|
45
45
|
```shell
|
|
46
46
|
my-app
|
|
47
|
-
├── electron/
|
|
48
|
-
│ └── # Main and preload files
|
|
49
47
|
├── public/
|
|
50
48
|
│ └── # Renderer HTML file(s)
|
|
51
49
|
├── src/
|
|
@@ -92,8 +90,8 @@ At the root of your project, create a `rebuiltron.config.cjs` file.
|
|
|
92
90
|
|
|
93
91
|
| Option | Type | Required | Description |
|
|
94
92
|
| --- | :---: | :---: | --- |
|
|
95
|
-
| `renderers` | `object` | ✓ | Renderer entries. It takes the name of the entries as keys and their paths as values. |
|
|
96
|
-
| `preloads` | `object` | ✓ | Preload entries. It takes the name of the entries as keys and their paths as values. |
|
|
93
|
+
| `renderers` | `object` | ✓ | Renderer entries. It takes the name of the entries as keys and their paths as values. All paths must be relative. |
|
|
94
|
+
| `preloads` | `object` | ✓ | Preload entries. It takes the name of the entries as keys and their paths as values. All paths must be relative. |
|
|
97
95
|
| `srcAlias` | `string` | ✗ | Custom [alias](https://webpack.js.org/configuration/resolve/#resolvealias) to the `src` folder.
|
|
98
96
|
| `sassOptions` | `object` | ✗ | Custom SASS options for [`sass-loader`](https://github.com/webpack-contrib/sass-loader). |
|
|
99
97
|
| `sassOptions.additionalData` | `object` | ✗* | Configuration of [`additionalData`](https://webpack.js.org/loaders/sass-loader/#additionaldata). |
|
package/configurations/base.js
CHANGED
|
@@ -44,11 +44,11 @@ module.exports = {
|
|
|
44
44
|
level: "none"
|
|
45
45
|
},
|
|
46
46
|
resolve: {
|
|
47
|
-
modules: ["node_modules", paths.appNodeModules, paths.
|
|
47
|
+
modules: ["node_modules", paths.appNodeModules, paths.src],
|
|
48
48
|
extensions: [".web.js", ".js", ".json", ".jsx", ".node"],
|
|
49
49
|
...emptyOr(srcAlias, {
|
|
50
50
|
alias: {
|
|
51
|
-
[srcAlias]: paths.
|
|
51
|
+
[srcAlias]: paths.src
|
|
52
52
|
}
|
|
53
53
|
})
|
|
54
54
|
},
|
package/helpers/paths.js
CHANGED
|
@@ -14,8 +14,7 @@ module.exports = {
|
|
|
14
14
|
appBuild: resolveApp(rebuiltronConfig.appDirs.build),
|
|
15
15
|
appPublic: resolveApp(rebuiltronConfig.appDirs.public),
|
|
16
16
|
appPackageJson: packageJsonPath,
|
|
17
|
-
|
|
18
|
-
electronSrc: resolveApp(rebuiltronConfig.appDirs.electronSrc),
|
|
17
|
+
src: resolveApp(rebuiltronConfig.appDirs.src),
|
|
19
18
|
appNodeModules: resolveApp("node_modules"),
|
|
20
19
|
appWebpackCache: resolveApp("node_modules/.cache"),
|
|
21
20
|
basePath: isEnvDevelopment ? "/" : "./"
|
package/loaders/javascript.js
CHANGED
|
@@ -6,7 +6,7 @@ module.exports = [
|
|
|
6
6
|
{
|
|
7
7
|
// Converts `import.meta.url` before SWC transpiles so paths using it stay dynamic
|
|
8
8
|
test: /\.js$/,
|
|
9
|
-
include: [paths.
|
|
9
|
+
include: [paths.electronMain],
|
|
10
10
|
loader: require.resolve("string-replace-loader"),
|
|
11
11
|
options: {
|
|
12
12
|
search: "import.meta.url",
|
package/loaders/style.js
CHANGED
package/package.json
CHANGED
package/rebuiltronConfig.js
CHANGED