rebuiltron 1.0.2 → 2.0.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 CHANGED
@@ -93,8 +93,9 @@ At the root of your project, create a `rebuiltron.config.js` file.
93
93
  | --- | :---: | :---: | --- |
94
94
  | `renderers` | `object` | ✓ | Renderer entries. It takes the name of the entries as keys and their paths as values. |
95
95
  | `preloads` | `object` | ✓ | Preload entries. It takes the name of the entries as keys and their paths as values. |
96
- | `sassOptions` | `object` | ✗ | Custom SASS options for `sass-loader`. |
97
- | `sassOptions.additionalData` | `object` | ✗* | Configuration of `additionalData`. |
96
+ | `srcAlias` | `string` | ✗ | Custom [alias](https://webpack.js.org/configuration/resolve/#resolvealias) to the `src` folder.
97
+ | `sassOptions` | `object` | | Custom SASS options for [`sass-loader`](https://github.com/webpack-contrib/sass-loader). |
98
+ | `sassOptions.additionalData` | `object` | ✗* | Configuration of [`additionalData`](https://webpack.js.org/loaders/sass-loader/#additionaldata). |
98
99
  | `sassOptions.additionalData.data` | `string` | ✗* | Data to prepend to SASS files. |
99
100
  | `sassOptions.additionalData.exclude` | `Regex` | ✗* | Regex matching the files to exclude from `additionalData`. This is necessary to prevent an `@import loop` error. |
100
101
 
@@ -105,12 +106,13 @@ At the root of your project, create a `rebuiltron.config.js` file.
105
106
  ```js
106
107
  module.exports = {
107
108
  renderers: {
108
- index: "./src/index.js",
109
+ app: "./src/app.js",
109
110
  worker: "./src/worker.js"
110
111
  },
111
112
  preloads: {
112
113
  worker: "./electron/preloads/worker.js"
113
114
  },
115
+ srcAlias: "@app",
114
116
  sassOptions: {
115
117
  additionalData: {
116
118
  data: "@use \"styles/settings\" as *;",
@@ -19,6 +19,8 @@ const javascriptLoaders = require("../loaders/javascript");
19
19
  const rebuiltronConfig = require("../rebuiltronConfig");
20
20
 
21
21
 
22
+ const { srcAlias } = require(paths.appConfig);
23
+
22
24
  module.exports = {
23
25
  stats: "errors-warnings",
24
26
  bail: isEnvProduction,
@@ -43,9 +45,11 @@ module.exports = {
43
45
  resolve: {
44
46
  modules: ["node_modules", paths.appNodeModules, paths.appSrc],
45
47
  extensions: [".web.js", ".js", ".json", ".jsx", ".node"],
46
- alias: {
47
- src: paths.appSrc
48
- }
48
+ ...emptyOr(srcAlias, {
49
+ alias: {
50
+ [srcAlias]: paths.appSrc
51
+ }
52
+ })
49
53
  },
50
54
  optimization: {
51
55
  minimize: isEnvProduction,
@@ -45,7 +45,7 @@ const _startElectron = (port) => {
45
45
  exitProcessWithError({
46
46
  message: [
47
47
  "An error occured while starting Electron.",
48
- "Please make sure the dependencies `electron` is installed."
48
+ "Please make sure the dependency `electron` is installed."
49
49
  ],
50
50
  stack: error.stack || error
51
51
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rebuiltron",
3
- "version": "1.0.2",
3
+ "version": "2.0.0",
4
4
  "author": "Arkellys",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -10,13 +10,13 @@
10
10
  "lint": "eslint \"**/*.js\""
11
11
  },
12
12
  "devDependencies": {
13
- "eslint-config-arklint": "^1.0.2"
13
+ "eslint-config-arklint": "^1.0.3"
14
14
  },
15
15
  "dependencies": {
16
16
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
17
17
  "@svgr/webpack": "^8.1.0",
18
- "@swc/core": "^1.3.81",
19
- "browserslist": "^4.18.1",
18
+ "@swc/core": "^1.3.93",
19
+ "browserslist": "^4.22.1",
20
20
  "case-sensitive-paths-webpack-plugin": "^2.4.0",
21
21
  "copy-webpack-plugin": "^11.0.0",
22
22
  "css-loader": "^6.5.1",
@@ -26,11 +26,11 @@
26
26
  "html-webpack-plugin": "^5.5.0",
27
27
  "lodash": "^4.17.21",
28
28
  "mini-css-extract-plugin": "^2.4.5",
29
- "postcss": "^8.4.29",
29
+ "postcss": "^8.4.31",
30
30
  "postcss-flexbugs-fixes": "^5.0.2",
31
31
  "postcss-loader": "^7.3.3",
32
32
  "postcss-normalize": "^10.0.1",
33
- "postcss-preset-env": "^9.1.2",
33
+ "postcss-preset-env": "^9.2.0",
34
34
  "react-dev-utils": "^12.0.1",
35
35
  "react-refresh": "^0.14.0",
36
36
  "resolve-url-loader": "^5.0.0",
@@ -40,7 +40,7 @@
40
40
  "style-loader": "^3.3.1",
41
41
  "swc-loader": "^0.2.3",
42
42
  "terser-webpack-plugin": "^5.2.5",
43
- "webpack": "^5.64.4",
43
+ "webpack": "^5.89.0",
44
44
  "webpack-dev-server": "^4.6.0"
45
45
  },
46
46
  "peerDependencies": {