@modern-js/module-tools 2.1.1-beta.0 → 2.1.1-beta.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.
@@ -40,7 +40,8 @@ __export(defineConfig_exports, {
40
40
  module.exports = __toCommonJS(defineConfig_exports);
41
41
  const defineConfig = (config) => config;
42
42
  const defineLegacyConfig = (config) => __spreadProps(__spreadValues({}, config), {
43
- legacy: true
43
+ legacy: true,
44
+ autoLoadPlugins: true
44
45
  });
45
46
  // Annotate the CommonJS export names for ESM import in node:
46
47
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,eAAe,CAAC,WAC3B;AAMK,MAAM,qBAAqB,CAChC,WAC4B,iCACzB,SADyB;AAAA,EAE5B,QAAQ;AACV;","names":[],"sources":["../../src/config/defineConfig.ts"],"sourcesContent":["import type { ModuleConfigParams, ModuleLegacyUserConfig } from '../types';\n\nexport const defineConfig = (config: ModuleConfigParams): ModuleConfigParams =>\n config;\n\n/**\n * @deprecated\n * Using defineConfig first.\n */\nexport const defineLegacyConfig = (\n config: ModuleLegacyUserConfig,\n): ModuleLegacyUserConfig => ({\n ...config,\n legacy: true,\n});\n"]}
1
+ {"version":3,"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,eAAe,CAAC,WAC3B;AAMK,MAAM,qBAAqB,CAChC,WAC4B,iCACzB,SADyB;AAAA,EAE5B,QAAQ;AAAA,EACR,iBAAiB;AACnB;","names":[],"sources":["../../src/config/defineConfig.ts"],"sourcesContent":["import type { ModuleConfigParams, ModuleLegacyUserConfig } from '../types';\n\nexport const defineConfig = (config: ModuleConfigParams): ModuleConfigParams =>\n config;\n\n/**\n * @deprecated\n * Using defineConfig first.\n */\nexport const defineLegacyConfig = (\n config: ModuleLegacyUserConfig,\n): ModuleLegacyUserConfig => ({\n ...config,\n legacy: true,\n autoLoadPlugins: true,\n});\n"]}
@@ -39,12 +39,12 @@ interface ToolsConfig {
39
39
  }
40
40
  export type PostCSSFunction = (options: PostCSSLoaderOptions, utils: PostCSSConfigUtils) => PostCSSLoaderOptions | void;
41
41
  export type ToolsLegacyUserConfig = {
42
- babel: any;
43
- less: LessConfig;
44
- lodash: any;
45
- postcss: PostCSSLoaderOptions | PostCSSFunction;
46
- sass: SassConfig;
47
- speedy: ToolsConfig['speedy'] | Array<NonNullable<ToolsConfig['speedy']>>;
42
+ babel?: any;
43
+ less?: LessConfig;
44
+ lodash?: any;
45
+ postcss?: PostCSSLoaderOptions | PostCSSFunction;
46
+ sass?: SassConfig;
47
+ speedy?: ToolsConfig['speedy'] | Array<NonNullable<ToolsConfig['speedy']>>;
48
48
  /**
49
49
  * The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.
50
50
  * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;;;;;;;;AAAA;AAAA;","names":[],"sources":["../../../src/types/legacyConfig/tools.ts"],"sourcesContent":["import type { JestConfig } from '@modern-js/core';\nimport type { AcceptedPlugin as PostCSSPlugin } from 'postcss';\nimport type { LessConfig, SassConfig } from '../config';\n\nexport type PostCSSOptions = {\n to?: string;\n from?: string;\n map?: any;\n syntax?: any;\n parser?: any;\n plugins?: PostCSSPlugin[];\n stringifier?: any;\n};\n\nexport type PostCSSLoaderOptions = {\n /**\n * Enable PostCSS Parser support in CSS-in-JS. If you use JS styles the postcss-js parser, add the execute option.\n */\n execute?: boolean;\n /**\n * By default generation of source maps depends on the devtool option. All values enable source map generation except eval and false value.\n */\n sourceMap?: boolean;\n /**\n * The special implementation option determines which implementation of PostCSS to use.\n */\n implementation?: unknown;\n /**\n * Allows to set PostCSS options and plugins.\n */\n postcssOptions?: PostCSSOptions;\n};\n\nexport type PostCSSConfigUtils = {\n addPlugins: (plugins: PostCSSPlugin | PostCSSPlugin[]) => void;\n};\n\ninterface ToolsConfig {\n speedy?: any | ((config: any) => any);\n}\n\nexport type PostCSSFunction = (\n options: PostCSSLoaderOptions,\n utils: PostCSSConfigUtils,\n) => PostCSSLoaderOptions | void;\n\nexport type ToolsLegacyUserConfig = {\n babel: any;\n less: LessConfig;\n lodash: any;\n postcss: PostCSSLoaderOptions | PostCSSFunction;\n sass: SassConfig;\n speedy: ToolsConfig['speedy'] | Array<NonNullable<ToolsConfig['speedy']>>;\n /**\n * The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.\n * Please use `yarn new` or `pnpm new` to enable the corresponding capability.\n * @requires `tailwindcss` plugin\n */\n tailwindcss?:\n | Record<string, any>\n | ((options: Record<string, any>) => Record<string, any> | void);\n jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);\n};\n"]}
1
+ {"version":3,"mappings":";;;;;;;;;;;;;AAAA;AAAA;","names":[],"sources":["../../../src/types/legacyConfig/tools.ts"],"sourcesContent":["import type { JestConfig } from '@modern-js/core';\nimport type { AcceptedPlugin as PostCSSPlugin } from 'postcss';\nimport type { LessConfig, SassConfig } from '../config';\n\nexport type PostCSSOptions = {\n to?: string;\n from?: string;\n map?: any;\n syntax?: any;\n parser?: any;\n plugins?: PostCSSPlugin[];\n stringifier?: any;\n};\n\nexport type PostCSSLoaderOptions = {\n /**\n * Enable PostCSS Parser support in CSS-in-JS. If you use JS styles the postcss-js parser, add the execute option.\n */\n execute?: boolean;\n /**\n * By default generation of source maps depends on the devtool option. All values enable source map generation except eval and false value.\n */\n sourceMap?: boolean;\n /**\n * The special implementation option determines which implementation of PostCSS to use.\n */\n implementation?: unknown;\n /**\n * Allows to set PostCSS options and plugins.\n */\n postcssOptions?: PostCSSOptions;\n};\n\nexport type PostCSSConfigUtils = {\n addPlugins: (plugins: PostCSSPlugin | PostCSSPlugin[]) => void;\n};\n\ninterface ToolsConfig {\n speedy?: any | ((config: any) => any);\n}\n\nexport type PostCSSFunction = (\n options: PostCSSLoaderOptions,\n utils: PostCSSConfigUtils,\n) => PostCSSLoaderOptions | void;\n\nexport type ToolsLegacyUserConfig = {\n babel?: any;\n less?: LessConfig;\n lodash?: any;\n postcss?: PostCSSLoaderOptions | PostCSSFunction;\n sass?: SassConfig;\n speedy?: ToolsConfig['speedy'] | Array<NonNullable<ToolsConfig['speedy']>>;\n /**\n * The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.\n * Please use `yarn new` or `pnpm new` to enable the corresponding capability.\n * @requires `tailwindcss` plugin\n */\n tailwindcss?:\n | Record<string, any>\n | ((options: Record<string, any>) => Record<string, any> | void);\n jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);\n};\n"]}
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "module-tools",
12
12
  "lib-tools"
13
13
  ],
14
- "version": "2.1.1-beta.0",
14
+ "version": "2.1.1-beta.2",
15
15
  "bin": {
16
16
  "modern": "./bin/modern.js",
17
17
  "modern-module": "./bin/modern.js"