@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.
@@ -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) {
@@ -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) {
@@ -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
- name?: string;
79
+ configFile?: string;
80
80
  plugins?: typeof INTERNAL_PLUGINS;
81
81
  beforeUsePlugins: (plugins: any, config: any) => {
82
82
  cli: any;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-plugins-202111301614",
14
+ "version": "0.0.0-plugins-202111302112",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
package/src/index.ts CHANGED
@@ -131,7 +131,7 @@ const initAppDir = async (): Promise<string> => {
131
131
  };
132
132
 
133
133
  export interface CoreOptions {
134
- name?: string;
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,