@modern-js/core 0.0.0-plugins-202111301614 → 0.0.0-plugins-202111302112
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/dist/js/modern/index.js +1 -1
- package/dist/js/node/index.js +1 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/index.ts +2 -2
package/dist/js/modern/index.js
CHANGED
|
@@ -59,7 +59,7 @@ const createCli = () => {
|
|
|
59
59
|
manager.clear();
|
|
60
60
|
const appDirectory = await initAppDir();
|
|
61
61
|
loadEnv(appDirectory);
|
|
62
|
-
const loaded = await loadUserConfig(appDirectory);
|
|
62
|
+
const loaded = await loadUserConfig(appDirectory, options === null || options === void 0 ? void 0 : options.configFile);
|
|
63
63
|
let plugins = loadPlugins(appDirectory, loaded.config.plugins || [], options === null || options === void 0 ? void 0 : options.plugins);
|
|
64
64
|
|
|
65
65
|
if (options !== null && options !== void 0 && options.beforeUsePlugins) {
|
package/dist/js/node/index.js
CHANGED
|
@@ -166,7 +166,7 @@ const createCli = () => {
|
|
|
166
166
|
manager.clear();
|
|
167
167
|
const appDirectory = await initAppDir();
|
|
168
168
|
(0, _loadEnv.loadEnv)(appDirectory);
|
|
169
|
-
const loaded = await (0, _config.loadUserConfig)(appDirectory);
|
|
169
|
+
const loaded = await (0, _config.loadUserConfig)(appDirectory, options === null || options === void 0 ? void 0 : options.configFile);
|
|
170
170
|
let plugins = (0, _loadPlugins.loadPlugins)(appDirectory, loaded.config.plugins || [], options === null || options === void 0 ? void 0 : options.plugins);
|
|
171
171
|
|
|
172
172
|
if (options !== null && options !== void 0 && options.beforeUsePlugins) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -76,7 +76,7 @@ export declare const usePlugins: (plugins: string[]) => void;
|
|
|
76
76
|
export { defineConfig, AppContext, useAppContext, useConfigContext, useResolvedConfigContext };
|
|
77
77
|
export type { NormalizedConfig, IAppContext, UserConfig, ToolsConfig };
|
|
78
78
|
export interface CoreOptions {
|
|
79
|
-
|
|
79
|
+
configFile?: string;
|
|
80
80
|
plugins?: typeof INTERNAL_PLUGINS;
|
|
81
81
|
beforeUsePlugins: (plugins: any, config: any) => {
|
|
82
82
|
cli: any;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -131,7 +131,7 @@ const initAppDir = async (): Promise<string> => {
|
|
|
131
131
|
};
|
|
132
132
|
|
|
133
133
|
export interface CoreOptions {
|
|
134
|
-
|
|
134
|
+
configFile?: string;
|
|
135
135
|
plugins?: typeof INTERNAL_PLUGINS;
|
|
136
136
|
beforeUsePlugins: (plugins: any, config: any) => { cli: any; server: any }[];
|
|
137
137
|
}
|
|
@@ -149,7 +149,7 @@ const createCli = () => {
|
|
|
149
149
|
|
|
150
150
|
loadEnv(appDirectory);
|
|
151
151
|
|
|
152
|
-
const loaded = await loadUserConfig(appDirectory);
|
|
152
|
+
const loaded = await loadUserConfig(appDirectory, options?.configFile);
|
|
153
153
|
|
|
154
154
|
let plugins = loadPlugins(
|
|
155
155
|
appDirectory,
|