@akanjs/config 0.9.12 → 0.9.13
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/cjs/src/nextConfig.js +1 -6
- package/esm/src/nextConfig.js +1 -5
- package/package.json +1 -1
package/cjs/src/nextConfig.js
CHANGED
|
@@ -35,8 +35,6 @@ module.exports = __toCommonJS(nextConfig_exports);
|
|
|
35
35
|
var import_bundle_analyzer = __toESM(require("@next/bundle-analyzer"));
|
|
36
36
|
var import_next_pwa = __toESM(require("next-pwa"));
|
|
37
37
|
var import_cache = __toESM(require("next-pwa/cache.js"));
|
|
38
|
-
var import_path = __toESM(require("path"));
|
|
39
|
-
const import_meta = {};
|
|
40
38
|
const composePlugins = (...plugins) => {
|
|
41
39
|
return function(baseConfig) {
|
|
42
40
|
return async function combined(phase, context) {
|
|
@@ -56,7 +54,6 @@ const composePlugins = (...plugins) => {
|
|
|
56
54
|
const commandType = process.env.AKAN_COMMAND_TYPE?.includes("start") ? "start" : process.env.AKAN_COMMAND_TYPE?.includes("build") ? "build" : "deploy";
|
|
57
55
|
const devDomain = process.env.NEXT_PUBLIC_SERVE_DOMAIN ?? "akanjs.com";
|
|
58
56
|
const withBase = (appName, config, libs, routes = []) => {
|
|
59
|
-
const __dirname = import_path.default.dirname(new URL(import_meta.url).pathname);
|
|
60
57
|
const withPWA = (0, import_next_pwa.default)({
|
|
61
58
|
dest: "public",
|
|
62
59
|
register: true,
|
|
@@ -127,15 +124,13 @@ const withBase = (appName, config, libs, routes = []) => {
|
|
|
127
124
|
webpack: (config2) => {
|
|
128
125
|
config2.resolve.alias.canvas = false;
|
|
129
126
|
config2.resolve.alias.encoding = false;
|
|
130
|
-
if (process.env.USE_AKANJS_PKGS === "true")
|
|
131
|
-
config2.resolve.alias["@akanjs/config"] = import_path.default.resolve(__dirname, "../../../../pkgs/@akanjs/config");
|
|
132
127
|
return config2;
|
|
133
128
|
},
|
|
134
129
|
turbopack: {
|
|
135
130
|
resolveAlias: {
|
|
136
131
|
// canvas: false,
|
|
137
132
|
// encoding: false,
|
|
138
|
-
...process.env.USE_AKANJS_PKGS === "true" ? { "@akanjs/config":
|
|
133
|
+
// ...(process.env.USE_AKANJS_PKGS === "true" ? { "@akanjs/config": "../../pkgs/@akanjs/config" } : {}),
|
|
139
134
|
...config.turbopack?.resolveAlias ?? {}
|
|
140
135
|
}
|
|
141
136
|
},
|
package/esm/src/nextConfig.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import withAnalyze from "@next/bundle-analyzer";
|
|
2
2
|
import pwa from "next-pwa";
|
|
3
3
|
import runtimeCaching from "next-pwa/cache.js";
|
|
4
|
-
import path from "path";
|
|
5
4
|
const composePlugins = (...plugins) => {
|
|
6
5
|
return function(baseConfig) {
|
|
7
6
|
return async function combined(phase, context) {
|
|
@@ -21,7 +20,6 @@ const composePlugins = (...plugins) => {
|
|
|
21
20
|
const commandType = process.env.AKAN_COMMAND_TYPE?.includes("start") ? "start" : process.env.AKAN_COMMAND_TYPE?.includes("build") ? "build" : "deploy";
|
|
22
21
|
const devDomain = process.env.NEXT_PUBLIC_SERVE_DOMAIN ?? "akanjs.com";
|
|
23
22
|
const withBase = (appName, config, libs, routes = []) => {
|
|
24
|
-
const __dirname = path.dirname(new URL(import.meta.url).pathname);
|
|
25
23
|
const withPWA = pwa({
|
|
26
24
|
dest: "public",
|
|
27
25
|
register: true,
|
|
@@ -92,15 +90,13 @@ const withBase = (appName, config, libs, routes = []) => {
|
|
|
92
90
|
webpack: (config2) => {
|
|
93
91
|
config2.resolve.alias.canvas = false;
|
|
94
92
|
config2.resolve.alias.encoding = false;
|
|
95
|
-
if (process.env.USE_AKANJS_PKGS === "true")
|
|
96
|
-
config2.resolve.alias["@akanjs/config"] = path.resolve(__dirname, "../../../../pkgs/@akanjs/config");
|
|
97
93
|
return config2;
|
|
98
94
|
},
|
|
99
95
|
turbopack: {
|
|
100
96
|
resolveAlias: {
|
|
101
97
|
// canvas: false,
|
|
102
98
|
// encoding: false,
|
|
103
|
-
...process.env.USE_AKANJS_PKGS === "true" ? { "@akanjs/config":
|
|
99
|
+
// ...(process.env.USE_AKANJS_PKGS === "true" ? { "@akanjs/config": "../../pkgs/@akanjs/config" } : {}),
|
|
104
100
|
...config.turbopack?.resolveAlias ?? {}
|
|
105
101
|
}
|
|
106
102
|
},
|