@modern-js/plugin-tailwindcss 0.0.0-next-20221130140620 → 0.0.0-next-20221202032240

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/CHANGELOG.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # @modern-js/plugin-tailwindcss
2
2
 
3
- ## 0.0.0-next-20221130140620
3
+ ## 0.0.0-next-20221202032240
4
4
 
5
5
  ### Major Changes
6
6
 
7
- - dda38c9c3: chore: v2
7
+ - dda38c9c3e: chore: v2
8
8
 
9
9
  ### Minor Changes
10
10
 
11
- - 92f0eade3: feat:
11
+ - 92f0eade39: feat:
12
12
 
13
13
  1. add style config and add new hook
14
14
  2. add dts alias logic
@@ -24,7 +24,7 @@
24
24
  4. 添加日志逻辑
25
25
  5. 添加 skipDeps 配置
26
26
 
27
- - 92f0eade3: feat:
27
+ - 92f0eade39: feat:
28
28
 
29
29
  1. core: 增加 test 函数
30
30
  2. module plugins: 增加 `babel`, `mainField`, `target` 插件
@@ -40,37 +40,39 @@
40
40
 
41
41
  ### Patch Changes
42
42
 
43
- - Updated dependencies [2344eb26e]
44
- - Updated dependencies [a11fcf8b5]
45
- - Updated dependencies [b18fa8f3e]
46
- - Updated dependencies [c9e800d39]
47
- - Updated dependencies [3e57f2bd5]
48
- - Updated dependencies [fbf5eed5a]
49
- - Updated dependencies [a2509bfbd]
50
- - Updated dependencies [e4357f185]
51
- - Updated dependencies [4369648ae]
52
- - Updated dependencies [92f0eade3]
53
- - Updated dependencies [92c099446]
54
- - Updated dependencies [edd1cfb1a]
55
- - Updated dependencies [cc971eabf]
56
- - Updated dependencies [5b9049f2e]
57
- - Updated dependencies [6bda14ed7]
58
- - Updated dependencies [92004d190]
59
- - Updated dependencies [b8bbe036c]
60
- - Updated dependencies [40ed5874c]
61
- - Updated dependencies [60d537863]
62
- - Updated dependencies [d5a31df78]
63
- - Updated dependencies [dda38c9c3]
64
- - Updated dependencies [8b8e1bb57]
65
- - Updated dependencies [3bbea92b2]
66
- - Updated dependencies [b710adb84]
67
- - Updated dependencies [18aaf4224]
68
- - Updated dependencies [fcace5b5b]
69
- - Updated dependencies [abf3421a7]
70
- - Updated dependencies [543be9558]
71
- - Updated dependencies [14b712da8]
72
- - @modern-js/runtime@0.0.0-next-20221130140620
73
- - @modern-js/utils@0.0.0-next-20221130140620
43
+ - d6546ad916: add buildConfig style in module-tools-v2 and remove tools
44
+ 在 module-tools-v2 里新增 buildConfig style 并删除 tools
45
+ - Updated dependencies [2344eb26ed]
46
+ - Updated dependencies [a11fcf8b50]
47
+ - Updated dependencies [b18fa8f3ed]
48
+ - Updated dependencies [c9e800d39a]
49
+ - Updated dependencies [3e57f2bd58]
50
+ - Updated dependencies [fbf5eed5aa]
51
+ - Updated dependencies [a2509bfbdb]
52
+ - Updated dependencies [e4357f1856]
53
+ - Updated dependencies [4369648ae2]
54
+ - Updated dependencies [92f0eade39]
55
+ - Updated dependencies [92c0994468]
56
+ - Updated dependencies [edd1cfb1af]
57
+ - Updated dependencies [cc971eabfc]
58
+ - Updated dependencies [5b9049f2e9]
59
+ - Updated dependencies [6bda14ed71]
60
+ - Updated dependencies [92004d1906]
61
+ - Updated dependencies [b8bbe036c7]
62
+ - Updated dependencies [40ed5874c6]
63
+ - Updated dependencies [60d5378632]
64
+ - Updated dependencies [d5a31df781]
65
+ - Updated dependencies [dda38c9c3e]
66
+ - Updated dependencies [8b8e1bb571]
67
+ - Updated dependencies [3bbea92b2a]
68
+ - Updated dependencies [b710adb843]
69
+ - Updated dependencies [18aaf42249]
70
+ - Updated dependencies [fcace5b5b9]
71
+ - Updated dependencies [abf3421a75]
72
+ - Updated dependencies [543be9558e]
73
+ - Updated dependencies [14b712da84]
74
+ - @modern-js/runtime@0.0.0-next-20221202032240
75
+ - @modern-js/utils@0.0.0-next-20221202032240
74
76
 
75
77
  ## 2.0.0-beta.2
76
78
 
@@ -1,8 +1,6 @@
1
1
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
2
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
4
  import path from 'path';
7
5
  import { PLUGIN_SCHEMAS, fs, CONFIG_CACHE_DIR, globby, nanoid, slash } from '@modern-js/utils';
8
6
  import DesignTokenPlugin from "./design-token/cli";
@@ -53,38 +51,19 @@ export default (({
53
51
  // TODO: Add interface about postcss config
54
52
  // TODO: In module project, also is called, but should not be called.
55
53
  postcss: config => {
54
+ var _modernConfig$tools, _modernConfig$source;
56
55
  const modernConfig = api.useResolvedConfigContext();
57
- if (!config.postcssOptions
58
- // config.$$tools === 'module-tools'
59
- ) {
60
- if (Array.isArray(config.plugins)) {
61
- const tailwindConfig = getTailwindConfig(modernConfig, {
62
- pureConfig: {
63
- content: ['./src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx', './src/**/*.less', './src/**/*.css', './src/**/*.sass', './src/**/*.scss', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
64
- }
65
- });
66
- config.plugins.push(require('tailwindcss')(tailwindConfig));
67
- } else {
68
- const tailwindConfig = getTailwindConfig(modernConfig, {
69
- pureConfig: {
70
- content: ['./src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx', './src/**/*.less', './src/**/*.css', './src/**/*.sass', './src/**/*.scss', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
71
- }
72
- });
73
- config.plugins = [require('tailwindcss')(tailwindConfig)];
56
+ const tailwindConfig = getTailwindConfig(modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig$tools = modernConfig.tools) === null || _modernConfig$tools === void 0 ? void 0 : _modernConfig$tools.tailwindcss, modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig$source = modernConfig.source) === null || _modernConfig$source === void 0 ? void 0 : _modernConfig$source.designSystem, {
57
+ pureConfig: {
58
+ content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx',
59
+ // about storybook
60
+ './storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
74
61
  }
62
+ });
63
+ if (Array.isArray(config.postcssOptions.plugins)) {
64
+ config.postcssOptions.plugins.push(require('tailwindcss')(tailwindConfig));
75
65
  } else {
76
- const tailwindConfig = getTailwindConfig(modernConfig, {
77
- pureConfig: {
78
- content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx',
79
- // about storybook
80
- './storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
81
- }
82
- });
83
- if (Array.isArray(config.postcssOptions.plugins)) {
84
- config.postcssOptions.plugins.push(require('tailwindcss')(tailwindConfig));
85
- } else {
86
- config.postcssOptions.plugins = [require('tailwindcss')(tailwindConfig)];
87
- }
66
+ config.postcssOptions.plugins = [require('tailwindcss')(tailwindConfig)];
88
67
  }
89
68
  },
90
69
  babel(config) {
@@ -118,6 +97,27 @@ export default (({
118
97
  }
119
98
  }
120
99
  };
100
+ },
101
+ beforeBuildTask({
102
+ config
103
+ }) {
104
+ const modernConfig = api.useResolvedConfigContext();
105
+ const {
106
+ designSystem
107
+ } = modernConfig;
108
+ const tailwindConfig = getTailwindConfig(config.style.tailwindCss, designSystem, {
109
+ pureConfig: {
110
+ content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx',
111
+ // about storybook
112
+ './storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
113
+ }
114
+ });
115
+ if (Array.isArray(config.style.postcss.plugins)) {
116
+ config.style.postcss.plugins.push(require('tailwindcss')(tailwindConfig));
117
+ } else {
118
+ config.style.postcss.plugins = [require('tailwindcss')(tailwindConfig)];
119
+ }
120
+ return config;
121
121
  }
122
122
  };
123
123
  }
@@ -1,8 +1,6 @@
1
1
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
2
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
4
  import { lazyImport, PLUGIN_SCHEMAS, createRuntimeExportsUtils } from '@modern-js/utils';
7
5
  export default (({
8
6
  pluginName
@@ -14,9 +12,7 @@ export default (({
14
12
  let pluginsExportsUtils;
15
13
  const resolveConfig = lazyImport('tailwindcss/resolveConfig', require);
16
14
  const PLUGIN_IDENTIFIER = 'designToken';
17
- const getDesignTokens = userConfig => {
18
- var _userConfig$source;
19
- const designSystem = (_userConfig$source = userConfig.source) === null || _userConfig$source === void 0 ? void 0 : _userConfig$source.designSystem;
15
+ const getDesignTokens = designSystem => {
20
16
  const tailwindcssConfig = {};
21
17
  tailwindcssConfig.theme = designSystem ? _objectSpread({}, designSystem) : {};
22
18
 
@@ -53,11 +49,11 @@ export default (({
53
49
  entrypoint,
54
50
  imports
55
51
  }) {
56
- var _userConfig$source$de, _userConfig$source2;
52
+ var _userConfig$source$de, _userConfig$source;
57
53
  const userConfig = api.useResolvedConfigContext();
58
- const designSystem = (_userConfig$source$de = (_userConfig$source2 = userConfig.source) === null || _userConfig$source2 === void 0 ? void 0 : _userConfig$source2.designSystem) !== null && _userConfig$source$de !== void 0 ? _userConfig$source$de : {};
54
+ const designSystem = (_userConfig$source$de = (_userConfig$source = userConfig.source) === null || _userConfig$source === void 0 ? void 0 : _userConfig$source.designSystem) !== null && _userConfig$source$de !== void 0 ? _userConfig$source$de : {};
59
55
  if (typeof designSystem === 'object' && designSystem.supportStyledComponents) {
60
- const designTokens = getDesignTokens(userConfig);
56
+ const designTokens = getDesignTokens(userConfig.source.designSystem);
61
57
  imports.push({
62
58
  value: '@modern-js/runtime/plugins',
63
59
  specifiers: [{
@@ -77,9 +73,9 @@ export default (({
77
73
  entrypoint,
78
74
  plugins
79
75
  }) {
80
- var _userConfig$source$de2, _userConfig$source3;
76
+ var _userConfig$source$de2, _userConfig$source2;
81
77
  const userConfig = api.useResolvedConfigContext();
82
- const designSystem = (_userConfig$source$de2 = (_userConfig$source3 = userConfig.source) === null || _userConfig$source3 === void 0 ? void 0 : _userConfig$source3.designSystem) !== null && _userConfig$source$de2 !== void 0 ? _userConfig$source$de2 : {};
78
+ const designSystem = (_userConfig$source$de2 = (_userConfig$source2 = userConfig.source) === null || _userConfig$source2 === void 0 ? void 0 : _userConfig$source2.designSystem) !== null && _userConfig$source$de2 !== void 0 ? _userConfig$source$de2 : {};
83
79
  let useSCThemeProvider = true;
84
80
  if (designSystem) {
85
81
  // when designSystem exist, designToken.styledComponents`s default value is false.
@@ -1,8 +1,6 @@
1
1
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
2
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
3
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
4
  import hoistNonReactStatics from 'hoist-non-react-statics';
7
5
  import React, { useContext } from 'react';
8
6
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -11,8 +11,7 @@ const getPureDesignSystemConfig = designSystemConfig => {
11
11
  delete pureDesignSystemConfig.supportStyledComponents;
12
12
  return pureDesignSystemConfig;
13
13
  };
14
- const getTailwindConfig = (config, option = {}) => {
15
- var _config$tools, _ref, _designSystem;
14
+ const getTailwindConfig = (tailwindcss, designSystem, option = {}) => {
16
15
  const purgeConfig = merge({
17
16
  // TODO: how the operating environment is determined
18
17
  enabled: process.env.NODE_ENV === 'production',
@@ -23,8 +22,8 @@ const getTailwindConfig = (config, option = {}) => {
23
22
  const defaultTailwindConfig = {
24
23
  purge: purgeConfig
25
24
  };
26
- const tailwindConfig = applyOptionsChain(defaultTailwindConfig, ((_config$tools = config.tools) === null || _config$tools === void 0 ? void 0 : _config$tools.tailwindcss) || {});
27
- const designSystem = getPureDesignSystemConfig((_ref = (_designSystem = config.designSystem) !== null && _designSystem !== void 0 ? _designSystem : config.source.designSystem) !== null && _ref !== void 0 ? _ref : {});
25
+ const tailwindConfig = applyOptionsChain(defaultTailwindConfig, tailwindcss || {});
26
+ const designSystemConfig = getPureDesignSystemConfig(designSystem !== null && designSystem !== void 0 ? designSystem : {});
28
27
  const [exist, key] = checkIfExistNotAllowKeys(tailwindConfig);
29
28
  if (exist) {
30
29
  logger.error(`should not exist '${key}' on tools.tailwindcss, please remove it`);
@@ -33,7 +32,7 @@ const getTailwindConfig = (config, option = {}) => {
33
32
  }
34
33
 
35
34
  // Because there is no default theme configuration
36
- tailwindConfig.theme = designSystem || {};
35
+ tailwindConfig.theme = designSystemConfig || {};
37
36
  return tailwindConfig;
38
37
  };
39
38
  export { getTailwindConfig };
@@ -12,9 +12,7 @@ var _utils2 = require("./utils");
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
14
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
15
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
17
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
15
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
16
  const supportCssInJsLibrary = 'styled-components';
19
17
  const getRandomTwConfigFileName = internalDirectory => {
20
18
  return (0, _utils.slash)(_path.default.join(internalDirectory, `tailwind.config.${Date.now()}.${(0, _utils.nanoid)()}.js`));
@@ -61,38 +59,19 @@ var _default = ({
61
59
  // TODO: Add interface about postcss config
62
60
  // TODO: In module project, also is called, but should not be called.
63
61
  postcss: config => {
62
+ var _modernConfig$tools, _modernConfig$source;
64
63
  const modernConfig = api.useResolvedConfigContext();
65
- if (!config.postcssOptions
66
- // config.$$tools === 'module-tools'
67
- ) {
68
- if (Array.isArray(config.plugins)) {
69
- const tailwindConfig = (0, _tailwind.getTailwindConfig)(modernConfig, {
70
- pureConfig: {
71
- content: ['./src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx', './src/**/*.less', './src/**/*.css', './src/**/*.sass', './src/**/*.scss', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
72
- }
73
- });
74
- config.plugins.push(require('tailwindcss')(tailwindConfig));
75
- } else {
76
- const tailwindConfig = (0, _tailwind.getTailwindConfig)(modernConfig, {
77
- pureConfig: {
78
- content: ['./src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx', './src/**/*.less', './src/**/*.css', './src/**/*.sass', './src/**/*.scss', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
79
- }
80
- });
81
- config.plugins = [require('tailwindcss')(tailwindConfig)];
64
+ const tailwindConfig = (0, _tailwind.getTailwindConfig)(modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig$tools = modernConfig.tools) === null || _modernConfig$tools === void 0 ? void 0 : _modernConfig$tools.tailwindcss, modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig$source = modernConfig.source) === null || _modernConfig$source === void 0 ? void 0 : _modernConfig$source.designSystem, {
65
+ pureConfig: {
66
+ content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx',
67
+ // about storybook
68
+ './storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
82
69
  }
70
+ });
71
+ if (Array.isArray(config.postcssOptions.plugins)) {
72
+ config.postcssOptions.plugins.push(require('tailwindcss')(tailwindConfig));
83
73
  } else {
84
- const tailwindConfig = (0, _tailwind.getTailwindConfig)(modernConfig, {
85
- pureConfig: {
86
- content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx',
87
- // about storybook
88
- './storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
89
- }
90
- });
91
- if (Array.isArray(config.postcssOptions.plugins)) {
92
- config.postcssOptions.plugins.push(require('tailwindcss')(tailwindConfig));
93
- } else {
94
- config.postcssOptions.plugins = [require('tailwindcss')(tailwindConfig)];
95
- }
74
+ config.postcssOptions.plugins = [require('tailwindcss')(tailwindConfig)];
96
75
  }
97
76
  },
98
77
  babel(config) {
@@ -126,6 +105,27 @@ var _default = ({
126
105
  }
127
106
  }
128
107
  };
108
+ },
109
+ beforeBuildTask({
110
+ config
111
+ }) {
112
+ const modernConfig = api.useResolvedConfigContext();
113
+ const {
114
+ designSystem
115
+ } = modernConfig;
116
+ const tailwindConfig = (0, _tailwind.getTailwindConfig)(config.style.tailwindCss, designSystem, {
117
+ pureConfig: {
118
+ content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx',
119
+ // about storybook
120
+ './storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
121
+ }
122
+ });
123
+ if (Array.isArray(config.style.postcss.plugins)) {
124
+ config.style.postcss.plugins.push(require('tailwindcss')(tailwindConfig));
125
+ } else {
126
+ config.style.postcss.plugins = [require('tailwindcss')(tailwindConfig)];
127
+ }
128
+ return config;
129
129
  }
130
130
  };
131
131
  }
@@ -7,9 +7,7 @@ exports.default = void 0;
7
7
  var _utils = require("@modern-js/utils");
8
8
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
9
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
10
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
12
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
11
  var _default = ({
14
12
  pluginName
15
13
  } = {
@@ -20,9 +18,7 @@ var _default = ({
20
18
  let pluginsExportsUtils;
21
19
  const resolveConfig = (0, _utils.lazyImport)('tailwindcss/resolveConfig', require);
22
20
  const PLUGIN_IDENTIFIER = 'designToken';
23
- const getDesignTokens = userConfig => {
24
- var _userConfig$source;
25
- const designSystem = (_userConfig$source = userConfig.source) === null || _userConfig$source === void 0 ? void 0 : _userConfig$source.designSystem;
21
+ const getDesignTokens = designSystem => {
26
22
  const tailwindcssConfig = {};
27
23
  tailwindcssConfig.theme = designSystem ? _objectSpread({}, designSystem) : {};
28
24
 
@@ -59,11 +55,11 @@ var _default = ({
59
55
  entrypoint,
60
56
  imports
61
57
  }) {
62
- var _userConfig$source$de, _userConfig$source2;
58
+ var _userConfig$source$de, _userConfig$source;
63
59
  const userConfig = api.useResolvedConfigContext();
64
- const designSystem = (_userConfig$source$de = (_userConfig$source2 = userConfig.source) === null || _userConfig$source2 === void 0 ? void 0 : _userConfig$source2.designSystem) !== null && _userConfig$source$de !== void 0 ? _userConfig$source$de : {};
60
+ const designSystem = (_userConfig$source$de = (_userConfig$source = userConfig.source) === null || _userConfig$source === void 0 ? void 0 : _userConfig$source.designSystem) !== null && _userConfig$source$de !== void 0 ? _userConfig$source$de : {};
65
61
  if (typeof designSystem === 'object' && designSystem.supportStyledComponents) {
66
- const designTokens = getDesignTokens(userConfig);
62
+ const designTokens = getDesignTokens(userConfig.source.designSystem);
67
63
  imports.push({
68
64
  value: '@modern-js/runtime/plugins',
69
65
  specifiers: [{
@@ -83,9 +79,9 @@ var _default = ({
83
79
  entrypoint,
84
80
  plugins
85
81
  }) {
86
- var _userConfig$source$de2, _userConfig$source3;
82
+ var _userConfig$source$de2, _userConfig$source2;
87
83
  const userConfig = api.useResolvedConfigContext();
88
- const designSystem = (_userConfig$source$de2 = (_userConfig$source3 = userConfig.source) === null || _userConfig$source3 === void 0 ? void 0 : _userConfig$source3.designSystem) !== null && _userConfig$source$de2 !== void 0 ? _userConfig$source$de2 : {};
84
+ const designSystem = (_userConfig$source$de2 = (_userConfig$source2 = userConfig.source) === null || _userConfig$source2 === void 0 ? void 0 : _userConfig$source2.designSystem) !== null && _userConfig$source$de2 !== void 0 ? _userConfig$source$de2 : {};
89
85
  let useSCThemeProvider = true;
90
86
  if (designSystem) {
91
87
  // when designSystem exist, designToken.styledComponents`s default value is false.
@@ -12,9 +12,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
12
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
13
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
14
14
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
15
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
17
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
15
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
18
16
  const DesignTokenContext = /*#__PURE__*/_react.default.createContext({});
19
17
  exports.DesignTokenContext = DesignTokenContext;
20
18
  const useDesignTokens = () => (0, _react.useContext)(DesignTokenContext);
@@ -17,8 +17,7 @@ const getPureDesignSystemConfig = designSystemConfig => {
17
17
  delete pureDesignSystemConfig.supportStyledComponents;
18
18
  return pureDesignSystemConfig;
19
19
  };
20
- const getTailwindConfig = (config, option = {}) => {
21
- var _config$tools, _ref, _designSystem;
20
+ const getTailwindConfig = (tailwindcss, designSystem, option = {}) => {
22
21
  const purgeConfig = (0, _lodash.merge)({
23
22
  // TODO: how the operating environment is determined
24
23
  enabled: process.env.NODE_ENV === 'production',
@@ -29,8 +28,8 @@ const getTailwindConfig = (config, option = {}) => {
29
28
  const defaultTailwindConfig = {
30
29
  purge: purgeConfig
31
30
  };
32
- const tailwindConfig = (0, _utils.applyOptionsChain)(defaultTailwindConfig, ((_config$tools = config.tools) === null || _config$tools === void 0 ? void 0 : _config$tools.tailwindcss) || {});
33
- const designSystem = getPureDesignSystemConfig((_ref = (_designSystem = config.designSystem) !== null && _designSystem !== void 0 ? _designSystem : config.source.designSystem) !== null && _ref !== void 0 ? _ref : {});
31
+ const tailwindConfig = (0, _utils.applyOptionsChain)(defaultTailwindConfig, tailwindcss || {});
32
+ const designSystemConfig = getPureDesignSystemConfig(designSystem !== null && designSystem !== void 0 ? designSystem : {});
34
33
  const [exist, key] = checkIfExistNotAllowKeys(tailwindConfig);
35
34
  if (exist) {
36
35
  _utils.logger.error(`should not exist '${key}' on tools.tailwindcss, please remove it`);
@@ -39,7 +38,7 @@ const getTailwindConfig = (config, option = {}) => {
39
38
  }
40
39
 
41
40
  // Because there is no default theme configuration
42
- tailwindConfig.theme = designSystem || {};
41
+ tailwindConfig.theme = designSystemConfig || {};
43
42
  return tailwindConfig;
44
43
  };
45
44
  exports.getTailwindConfig = getTailwindConfig;
@@ -57,38 +57,19 @@ export default (function () {
57
57
  // TODO: Add interface about postcss config
58
58
  // TODO: In module project, also is called, but should not be called.
59
59
  postcss: function postcss(config) {
60
+ var _modernConfig$tools, _modernConfig$source;
60
61
  var modernConfig = api.useResolvedConfigContext();
61
- if (!config.postcssOptions
62
- // config.$$tools === 'module-tools'
63
- ) {
64
- if (Array.isArray(config.plugins)) {
65
- var tailwindConfig = getTailwindConfig(modernConfig, {
66
- pureConfig: {
67
- content: ['./src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx', './src/**/*.less', './src/**/*.css', './src/**/*.sass', './src/**/*.scss', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
68
- }
69
- });
70
- config.plugins.push(require('tailwindcss')(tailwindConfig));
71
- } else {
72
- var _tailwindConfig = getTailwindConfig(modernConfig, {
73
- pureConfig: {
74
- content: ['./src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx', './src/**/*.less', './src/**/*.css', './src/**/*.sass', './src/**/*.scss', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
75
- }
76
- });
77
- config.plugins = [require('tailwindcss')(_tailwindConfig)];
62
+ var tailwindConfig = getTailwindConfig(modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig$tools = modernConfig.tools) === null || _modernConfig$tools === void 0 ? void 0 : _modernConfig$tools.tailwindcss, modernConfig === null || modernConfig === void 0 ? void 0 : (_modernConfig$source = modernConfig.source) === null || _modernConfig$source === void 0 ? void 0 : _modernConfig$source.designSystem, {
63
+ pureConfig: {
64
+ content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx',
65
+ // about storybook
66
+ './storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
78
67
  }
68
+ });
69
+ if (Array.isArray(config.postcssOptions.plugins)) {
70
+ config.postcssOptions.plugins.push(require('tailwindcss')(tailwindConfig));
79
71
  } else {
80
- var _tailwindConfig2 = getTailwindConfig(modernConfig, {
81
- pureConfig: {
82
- content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx',
83
- // about storybook
84
- './storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
85
- }
86
- });
87
- if (Array.isArray(config.postcssOptions.plugins)) {
88
- config.postcssOptions.plugins.push(require('tailwindcss')(_tailwindConfig2));
89
- } else {
90
- config.postcssOptions.plugins = [require('tailwindcss')(_tailwindConfig2)];
91
- }
72
+ config.postcssOptions.plugins = [require('tailwindcss')(tailwindConfig)];
92
73
  }
93
74
  },
94
75
  babel: function babel(config) {
@@ -122,6 +103,24 @@ export default (function () {
122
103
  }
123
104
  }
124
105
  };
106
+ },
107
+ beforeBuildTask: function beforeBuildTask(_ref2) {
108
+ var config = _ref2.config;
109
+ var modernConfig = api.useResolvedConfigContext();
110
+ var designSystem = modernConfig.designSystem;
111
+ var tailwindConfig = getTailwindConfig(config.style.tailwindCss, designSystem, {
112
+ pureConfig: {
113
+ content: ['./config/html/**/*.html', './config/html/**/*.ejs', './config/html/**/*.hbs', './src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx',
114
+ // about storybook
115
+ './storybook/**/*', './styles/**/*.less', './styles/**/*.css', './styles/**/*.sass', './styles/**/*.scss']
116
+ }
117
+ });
118
+ if (Array.isArray(config.style.postcss.plugins)) {
119
+ config.style.postcss.plugins.push(require('tailwindcss')(tailwindConfig));
120
+ } else {
121
+ config.style.postcss.plugins = [require('tailwindcss')(tailwindConfig)];
122
+ }
123
+ return config;
125
124
  }
126
125
  });
127
126
  case 6:
@@ -12,9 +12,7 @@ export default (function () {
12
12
  var pluginsExportsUtils;
13
13
  var resolveConfig = lazyImport('tailwindcss/resolveConfig', require);
14
14
  var PLUGIN_IDENTIFIER = 'designToken';
15
- var getDesignTokens = function getDesignTokens(userConfig) {
16
- var _userConfig$source;
17
- var designSystem = (_userConfig$source = userConfig.source) === null || _userConfig$source === void 0 ? void 0 : _userConfig$source.designSystem;
15
+ var getDesignTokens = function getDesignTokens(designSystem) {
18
16
  var tailwindcssConfig = {};
19
17
  tailwindcssConfig.theme = designSystem ? _objectSpread({}, designSystem) : {};
20
18
 
@@ -48,13 +46,13 @@ export default (function () {
48
46
  };
49
47
  },
50
48
  modifyEntryImports: function modifyEntryImports(_ref2) {
51
- var _userConfig$source$de, _userConfig$source2;
49
+ var _userConfig$source$de, _userConfig$source;
52
50
  var entrypoint = _ref2.entrypoint,
53
51
  imports = _ref2.imports;
54
52
  var userConfig = api.useResolvedConfigContext();
55
- var designSystem = (_userConfig$source$de = (_userConfig$source2 = userConfig.source) === null || _userConfig$source2 === void 0 ? void 0 : _userConfig$source2.designSystem) !== null && _userConfig$source$de !== void 0 ? _userConfig$source$de : {};
53
+ var designSystem = (_userConfig$source$de = (_userConfig$source = userConfig.source) === null || _userConfig$source === void 0 ? void 0 : _userConfig$source.designSystem) !== null && _userConfig$source$de !== void 0 ? _userConfig$source$de : {};
56
54
  if (_typeof(designSystem) === 'object' && designSystem.supportStyledComponents) {
57
- var designTokens = getDesignTokens(userConfig);
55
+ var designTokens = getDesignTokens(userConfig.source.designSystem);
58
56
  imports.push({
59
57
  value: '@modern-js/runtime/plugins',
60
58
  specifiers: [{
@@ -69,11 +67,11 @@ export default (function () {
69
67
  };
70
68
  },
71
69
  modifyEntryRuntimePlugins: function modifyEntryRuntimePlugins(_ref3) {
72
- var _userConfig$source$de2, _userConfig$source3;
70
+ var _userConfig$source$de2, _userConfig$source2;
73
71
  var entrypoint = _ref3.entrypoint,
74
72
  plugins = _ref3.plugins;
75
73
  var userConfig = api.useResolvedConfigContext();
76
- var designSystem = (_userConfig$source$de2 = (_userConfig$source3 = userConfig.source) === null || _userConfig$source3 === void 0 ? void 0 : _userConfig$source3.designSystem) !== null && _userConfig$source$de2 !== void 0 ? _userConfig$source$de2 : {};
74
+ var designSystem = (_userConfig$source$de2 = (_userConfig$source2 = userConfig.source) === null || _userConfig$source2 === void 0 ? void 0 : _userConfig$source2.designSystem) !== null && _userConfig$source$de2 !== void 0 ? _userConfig$source$de2 : {};
77
75
  var useSCThemeProvider = true;
78
76
  if (designSystem) {
79
77
  // when designSystem exist, designToken.styledComponents`s default value is false.
@@ -14,9 +14,8 @@ var getPureDesignSystemConfig = function getPureDesignSystemConfig(designSystemC
14
14
  delete pureDesignSystemConfig.supportStyledComponents;
15
15
  return pureDesignSystemConfig;
16
16
  };
17
- var getTailwindConfig = function getTailwindConfig(config) {
18
- var _config$tools, _ref, _designSystem;
19
- var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
17
+ var getTailwindConfig = function getTailwindConfig(tailwindcss, designSystem) {
18
+ var option = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
20
19
  var purgeConfig = merge({
21
20
  // TODO: how the operating environment is determined
22
21
  enabled: process.env.NODE_ENV === 'production',
@@ -27,8 +26,8 @@ var getTailwindConfig = function getTailwindConfig(config) {
27
26
  var defaultTailwindConfig = {
28
27
  purge: purgeConfig
29
28
  };
30
- var tailwindConfig = applyOptionsChain(defaultTailwindConfig, ((_config$tools = config.tools) === null || _config$tools === void 0 ? void 0 : _config$tools.tailwindcss) || {});
31
- var designSystem = getPureDesignSystemConfig((_ref = (_designSystem = config.designSystem) !== null && _designSystem !== void 0 ? _designSystem : config.source.designSystem) !== null && _ref !== void 0 ? _ref : {});
29
+ var tailwindConfig = applyOptionsChain(defaultTailwindConfig, tailwindcss || {});
30
+ var designSystemConfig = getPureDesignSystemConfig(designSystem !== null && designSystem !== void 0 ? designSystem : {});
32
31
  var _checkIfExistNotAllow = checkIfExistNotAllowKeys(tailwindConfig),
33
32
  _checkIfExistNotAllow2 = _slicedToArray(_checkIfExistNotAllow, 2),
34
33
  exist = _checkIfExistNotAllow2[0],
@@ -40,7 +39,7 @@ var getTailwindConfig = function getTailwindConfig(config) {
40
39
  }
41
40
 
42
41
  // Because there is no default theme configuration
43
- tailwindConfig.theme = designSystem || {};
42
+ tailwindConfig.theme = designSystemConfig || {};
44
43
  return tailwindConfig;
45
44
  };
46
45
  export { getTailwindConfig };
@@ -1,8 +1,9 @@
1
- import type { LegacyAppTools, CliPlugin } from '@modern-js/app-tools';
1
+ import type { LegacyAppTools } from '@modern-js/app-tools';
2
+ import type { CliPlugin, ModuleTools } from '@modern-js/module-tools-v2';
2
3
  export declare const getRandomTwConfigFileName: (internalDirectory: string) => string;
3
4
  declare const _default: ({
4
5
  pluginName
5
6
  }?: {
6
7
  pluginName: string;
7
- }) => CliPlugin<LegacyAppTools>;
8
+ }) => CliPlugin<LegacyAppTools & ModuleTools>;
8
9
  export default _default;
@@ -1,5 +1,5 @@
1
- import type { AppLegacyNormalizedConfig } from '@modern-js/app-tools';
2
- declare const getTailwindConfig: (config: AppLegacyNormalizedConfig, option?: {
1
+ import { DesignSystem, Tailwind } from './types';
2
+ declare const getTailwindConfig: (tailwindcss?: Tailwind, designSystem?: DesignSystem, option?: {
3
3
  pureConfig?: Record<string, any>;
4
- }) => any;
4
+ }) => Record<string, any>;
5
5
  export { getTailwindConfig };
@@ -1,10 +1,4 @@
1
- export type LegacyUserConfig = {
2
- designSystem?: Record<string, any> & {
3
- supportStyledComponents?: boolean;
4
- };
5
- source?: {
6
- designSystem?: Record<string, any> & {
7
- supportStyledComponents?: boolean;
8
- };
9
- };
10
- };
1
+ export declare type DesignSystem = Record<string, any> & {
2
+ supportStyledComponents?: boolean;
3
+ };
4
+ export declare type Tailwind = Record<string, any> | ((options: Record<string, any>) => Record<string, any> | void);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "0.0.0-next-20221130140620",
14
+ "version": "0.0.0-next-20221202032240",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -45,7 +45,7 @@
45
45
  "dependencies": {
46
46
  "@babel/runtime": "^7.18.0",
47
47
  "hoist-non-react-statics": "^3.3.2",
48
- "@modern-js/utils": "0.0.0-next-20221130140620"
48
+ "@modern-js/utils": "0.0.0-next-20221202032240"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/jest": "^27",
@@ -56,16 +56,17 @@
56
56
  "jest": "^27",
57
57
  "react": "^18",
58
58
  "postcss": "^8.4.14",
59
- "@modern-js/core": "0.0.0-next-20221130140620",
60
- "@modern-js/runtime": "0.0.0-next-20221130140620",
61
- "@modern-js/types": "0.0.0-next-20221130140620",
62
- "@scripts/build": "0.0.0-next-20221130140620",
63
- "@modern-js/app-tools": "0.0.0-next-20221130140620",
64
- "@scripts/jest-config": "0.0.0-next-20221130140620"
59
+ "@modern-js/core": "0.0.0-next-20221202032240",
60
+ "@modern-js/module-tools-v2": "0.0.0-next-20221202032240",
61
+ "@modern-js/runtime": "0.0.0-next-20221202032240",
62
+ "@modern-js/types": "0.0.0-next-20221202032240",
63
+ "@scripts/build": "0.0.0-next-20221202032240",
64
+ "@modern-js/app-tools": "0.0.0-next-20221202032240",
65
+ "@scripts/jest-config": "0.0.0-next-20221202032240"
65
66
  },
66
67
  "peerDependencies": {
67
68
  "tailwindcss": "^2.0.4",
68
- "@modern-js/runtime": "0.0.0-next-20221130140620"
69
+ "@modern-js/runtime": "^0.0.0-next-20221202032240"
69
70
  },
70
71
  "peerDependenciesMeta": {
71
72
  "@modern-js/runtime": {