@unsetsoft/ryunixjs 0.3.2-nightly.8 → 0.3.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unsetsoft/ryunixjs",
3
- "version": "0.3.2-nightly.8",
3
+ "version": "0.3.2",
4
4
  "license": "MIT",
5
5
  "main": "./dist/Ryunix.js",
6
6
  "private": false,
package/utils/config.cjs CHANGED
@@ -4,11 +4,8 @@ const configFile = path.join(__dirname, "../../../../", "ryunix.config.js");
4
4
 
5
5
  let config = {};
6
6
 
7
- console.log(configFile);
8
-
9
7
  if (fs.existsSync(configFile)) {
10
- config = require(path.relative(configFile));
11
- console.log(config);
8
+ config = require("../../../../ryunix.config.js");
12
9
  console.log("[info] configuration file was found.");
13
10
  }
14
11
 
@@ -22,13 +22,15 @@ if (manager === "yarn" || manager === "npm" || manager === "bun") {
22
22
  throw new Error(`The manager ${manager} is not supported.`);
23
23
  }
24
24
 
25
+ const mode = config.production ? "production" : "development";
26
+
25
27
  export default {
26
- mode: "production",
27
- context: resolveApp(dir, config.appDirectory),
28
+ mode,
29
+ context: join(dir, config.appDirectory),
28
30
  entry: "./main.ryx",
29
31
  devtool: "nosources-source-map",
30
32
  output: {
31
- path: resolveApp(dir, config.buildDirectory),
33
+ path: join(dir, config.buildDirectory),
32
34
  chunkFilename: "./assets/js/[name].[fullhash:8].bundle.js",
33
35
  assetModuleFilename: "./assets/media/[name].[hash][ext]",
34
36
  filename: "./assets/js/[name].[fullhash:8].bundle.js",
@@ -129,8 +131,8 @@ export default {
129
131
  },
130
132
  plugins: [
131
133
  new HtmlWebpackPlugin({
132
- favicon: resolveApp(dir, `${config.publicDirectory}/favicon.png`),
133
- template: resolveApp(dir, `${config.publicDirectory}/index.html`),
134
+ favicon: join(dir, `${config.publicDirectory}/favicon.png`),
135
+ template: join(dir, `${config.publicDirectory}/index.html`),
134
136
  }),
135
137
  ],
136
138
  externals: {