@modern-js/core 0.0.0-options-202112031440 → 0.0.0-options-202112031520
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
|
@@ -60,7 +60,7 @@ const createCli = () => {
|
|
|
60
60
|
manager.clear();
|
|
61
61
|
const appDirectory = await initAppDir();
|
|
62
62
|
loadEnv(appDirectory);
|
|
63
|
-
const loaded = await loadUserConfig(appDirectory);
|
|
63
|
+
const loaded = await loadUserConfig(appDirectory, options === null || options === void 0 ? void 0 : options.configFile);
|
|
64
64
|
let plugins = loadPlugins(appDirectory, loaded.config.plugins || [], options === null || options === void 0 ? void 0 : options.plugins);
|
|
65
65
|
|
|
66
66
|
if (options !== null && options !== void 0 && options.beforeUsePlugins) {
|
package/dist/js/node/index.js
CHANGED
|
@@ -167,7 +167,7 @@ const createCli = () => {
|
|
|
167
167
|
manager.clear();
|
|
168
168
|
const appDirectory = await initAppDir();
|
|
169
169
|
(0, _loadEnv.loadEnv)(appDirectory);
|
|
170
|
-
const loaded = await (0, _config.loadUserConfig)(appDirectory);
|
|
170
|
+
const loaded = await (0, _config.loadUserConfig)(appDirectory, options === null || options === void 0 ? void 0 : options.configFile);
|
|
171
171
|
let plugins = (0, _loadPlugins.loadPlugins)(appDirectory, loaded.config.plugins || [], options === null || options === void 0 ? void 0 : options.plugins);
|
|
172
172
|
|
|
173
173
|
if (options !== null && options !== void 0 && options.beforeUsePlugins) {
|
package/dist/types/index.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export declare const usePlugins: (plugins: string[]) => void;
|
|
|
91
91
|
export { defineConfig, AppContext, useAppContext, useConfigContext, useResolvedConfigContext };
|
|
92
92
|
export type { NormalizedConfig, IAppContext, UserConfig, ToolsConfig };
|
|
93
93
|
export interface CoreOptions {
|
|
94
|
-
|
|
94
|
+
configFile?: string;
|
|
95
95
|
plugins?: typeof INTERNAL_PLUGINS;
|
|
96
96
|
beforeUsePlugins: (plugins: any, config: any) => {
|
|
97
97
|
cli: any;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -139,7 +139,7 @@ const initAppDir = async (): Promise<string> => {
|
|
|
139
139
|
};
|
|
140
140
|
|
|
141
141
|
export interface CoreOptions {
|
|
142
|
-
|
|
142
|
+
configFile?: string;
|
|
143
143
|
plugins?: typeof INTERNAL_PLUGINS;
|
|
144
144
|
beforeUsePlugins: (plugins: any, config: any) => { cli: any; server: any }[];
|
|
145
145
|
}
|
|
@@ -157,7 +157,7 @@ const createCli = () => {
|
|
|
157
157
|
|
|
158
158
|
loadEnv(appDirectory);
|
|
159
159
|
|
|
160
|
-
const loaded = await loadUserConfig(appDirectory);
|
|
160
|
+
const loaded = await loadUserConfig(appDirectory, options?.configFile);
|
|
161
161
|
|
|
162
162
|
let plugins = loadPlugins(
|
|
163
163
|
appDirectory,
|