@modern-js/plugin-tailwindcss 2.0.0-beta.3 → 2.0.0-beta.6
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 +197 -0
- package/dist/js/modern/cli.js +132 -79
- package/dist/js/modern/design-token/cli/index.js +57 -51
- package/dist/js/modern/design-token/global.d.js +0 -0
- package/dist/js/modern/design-token/index.js +5 -2
- package/dist/js/modern/design-token/postcss-plugin/index.js +11 -8
- package/dist/js/modern/design-token/runtime/index.js +4 -1
- package/dist/js/modern/design-token/runtime/plugin.js +41 -29
- package/dist/js/modern/index.js +4 -1
- package/dist/js/modern/modern-app.env.d.js +0 -0
- package/dist/js/modern/tailwind.js +28 -21
- package/dist/js/modern/utils.js +32 -8
- package/dist/js/node/cli.js +156 -90
- package/dist/js/node/design-token/cli/index.js +70 -56
- package/dist/js/node/design-token/global.d.js +0 -0
- package/dist/js/node/design-token/index.js +31 -24
- package/dist/js/node/design-token/postcss-plugin/index.js +30 -13
- package/dist/js/node/design-token/runtime/index.js +33 -22
- package/dist/js/node/design-token/runtime/plugin.js +68 -40
- package/dist/js/node/index.js +29 -11
- package/dist/js/node/modern-app.env.d.js +0 -0
- package/dist/js/node/tailwind.js +51 -27
- package/dist/js/node/types.js +15 -0
- package/dist/js/node/utils.js +61 -16
- package/dist/js/treeshaking/cli.js +265 -132
- package/dist/js/treeshaking/design-token/cli/index.js +116 -99
- package/dist/js/treeshaking/design-token/global.d.js +1 -0
- package/dist/js/treeshaking/design-token/index.js +3 -2
- package/dist/js/treeshaking/design-token/postcss-plugin/index.js +17 -26
- package/dist/js/treeshaking/design-token/runtime/index.js +2 -1
- package/dist/js/treeshaking/design-token/runtime/plugin.js +76 -55
- package/dist/js/treeshaking/index.js +2 -1
- package/dist/js/treeshaking/modern-app.env.d.js +1 -0
- package/dist/js/treeshaking/tailwind.js +86 -42
- package/dist/js/treeshaking/types.js +1 -0
- package/dist/js/treeshaking/utils.js +159 -44
- package/dist/types/cli.d.ts +3 -1
- package/dist/types/design-token/cli/index.d.ts +2 -0
- package/dist/types/design-token/postcss-plugin/index.d.ts +2 -0
- package/dist/types/design-token/runtime/plugin.d.ts +2 -0
- package/package.json +11 -10
@@ -1,49 +1,56 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
var __defProp = Object.defineProperty;
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
6
|
+
var __spreadValues = (a, b) => {
|
7
|
+
for (var prop in b || (b = {}))
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
10
|
+
if (__getOwnPropSymbols)
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
12
|
+
if (__propIsEnum.call(b, prop))
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
14
|
+
}
|
15
|
+
return a;
|
16
|
+
};
|
17
|
+
import { jsx } from "react/jsx-runtime";
|
18
|
+
import hoistNonReactStatics from "hoist-non-react-statics";
|
19
|
+
import React, { useContext } from "react";
|
20
|
+
const DesignTokenContext = React.createContext({});
|
21
|
+
const useDesignTokens = () => useContext(DesignTokenContext);
|
22
|
+
var plugin_default = (options = {}) => ({
|
23
|
+
name: "@modern-js/plugin-design-token",
|
11
24
|
setup: () => ({
|
12
|
-
hoc({
|
13
|
-
|
14
|
-
}, next) {
|
15
|
-
const DesignTokenAppWrapper = props => {
|
25
|
+
hoc({ App }, next) {
|
26
|
+
const DesignTokenAppWrapper = (props) => {
|
16
27
|
const {
|
17
28
|
token = {},
|
18
29
|
useStyledComponentsThemeProvider = false,
|
19
30
|
useDesignTokenContext = false
|
20
31
|
} = options;
|
21
32
|
if (useStyledComponentsThemeProvider && useDesignTokenContext) {
|
22
|
-
const {
|
23
|
-
|
24
|
-
} = require('@modern-js/runtime/styled');
|
25
|
-
return /*#__PURE__*/_jsx(ThemeProvider, {
|
33
|
+
const { ThemeProvider } = require("@modern-js/runtime/styled");
|
34
|
+
return /* @__PURE__ */ jsx(ThemeProvider, {
|
26
35
|
theme: token,
|
27
|
-
children:
|
36
|
+
children: /* @__PURE__ */ jsx(DesignTokenContext.Provider, {
|
28
37
|
value: token,
|
29
|
-
children:
|
38
|
+
children: /* @__PURE__ */ jsx(App, __spreadValues({}, props))
|
30
39
|
})
|
31
40
|
});
|
32
41
|
} else if (useStyledComponentsThemeProvider) {
|
33
|
-
const {
|
34
|
-
|
35
|
-
} = require('@modern-js/runtime/styled');
|
36
|
-
return /*#__PURE__*/_jsx(ThemeProvider, {
|
42
|
+
const { ThemeProvider } = require("@modern-js/runtime/styled");
|
43
|
+
return /* @__PURE__ */ jsx(ThemeProvider, {
|
37
44
|
theme: token,
|
38
|
-
children:
|
45
|
+
children: /* @__PURE__ */ jsx(App, __spreadValues({}, props))
|
39
46
|
});
|
40
47
|
} else if (useDesignTokenContext) {
|
41
|
-
return
|
48
|
+
return /* @__PURE__ */ jsx(DesignTokenContext.Provider, {
|
42
49
|
value: token,
|
43
|
-
children:
|
50
|
+
children: /* @__PURE__ */ jsx(App, __spreadValues({}, props))
|
44
51
|
});
|
45
52
|
} else {
|
46
|
-
return
|
53
|
+
return /* @__PURE__ */ jsx(App, __spreadValues({}, props));
|
47
54
|
}
|
48
55
|
};
|
49
56
|
return next({
|
@@ -51,4 +58,9 @@ export default ((options = {}) => ({
|
|
51
58
|
});
|
52
59
|
}
|
53
60
|
})
|
54
|
-
})
|
61
|
+
});
|
62
|
+
export {
|
63
|
+
DesignTokenContext,
|
64
|
+
plugin_default as default,
|
65
|
+
useDesignTokens
|
66
|
+
};
|
package/dist/js/modern/index.js
CHANGED
File without changes
|
@@ -1,38 +1,45 @@
|
|
1
|
-
import { applyOptionsChain, logger } from
|
2
|
-
import { merge, cloneDeep } from
|
3
|
-
const checkIfExistNotAllowKeys = tailwindConfig => {
|
4
|
-
const notAllowExistKeys = [
|
5
|
-
let notAllowKey =
|
6
|
-
const ret = Object.keys(tailwindConfig).some(
|
1
|
+
import { applyOptionsChain, logger } from "@modern-js/utils";
|
2
|
+
import { merge, cloneDeep } from "@modern-js/utils/lodash";
|
3
|
+
const checkIfExistNotAllowKeys = (tailwindConfig) => {
|
4
|
+
const notAllowExistKeys = ["theme"];
|
5
|
+
let notAllowKey = "";
|
6
|
+
const ret = Object.keys(tailwindConfig).some(
|
7
|
+
(key) => notAllowExistKeys.includes(key) && (notAllowKey = key)
|
8
|
+
);
|
7
9
|
return [ret, notAllowKey];
|
8
10
|
};
|
9
|
-
const getPureDesignSystemConfig = designSystemConfig => {
|
11
|
+
const getPureDesignSystemConfig = (designSystemConfig) => {
|
10
12
|
const pureDesignSystemConfig = cloneDeep(designSystemConfig);
|
11
13
|
delete pureDesignSystemConfig.supportStyledComponents;
|
12
14
|
return pureDesignSystemConfig;
|
13
15
|
};
|
14
16
|
const getTailwindConfig = (tailwindcss, designSystem, option = {}) => {
|
15
|
-
const purgeConfig = merge(
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
const purgeConfig = merge(
|
18
|
+
{
|
19
|
+
enabled: process.env.NODE_ENV === "production",
|
20
|
+
layers: ["utilities"],
|
21
|
+
content: []
|
22
|
+
},
|
23
|
+
option.pureConfig || {}
|
24
|
+
);
|
22
25
|
const defaultTailwindConfig = {
|
23
26
|
purge: purgeConfig
|
24
27
|
};
|
25
|
-
const tailwindConfig = applyOptionsChain(
|
26
|
-
|
28
|
+
const tailwindConfig = applyOptionsChain(
|
29
|
+
defaultTailwindConfig,
|
30
|
+
tailwindcss || {}
|
31
|
+
);
|
32
|
+
const designSystemConfig = getPureDesignSystemConfig(designSystem != null ? designSystem : {});
|
27
33
|
const [exist, key] = checkIfExistNotAllowKeys(tailwindConfig);
|
28
34
|
if (exist) {
|
29
|
-
logger.error(
|
30
|
-
|
35
|
+
logger.error(
|
36
|
+
`should not exist '${key}' on tools.tailwindcss, please remove it`
|
37
|
+
);
|
31
38
|
process.exit(0);
|
32
39
|
}
|
33
|
-
|
34
|
-
// Because there is no default theme configuration
|
35
40
|
tailwindConfig.theme = designSystemConfig || {};
|
36
41
|
return tailwindConfig;
|
37
42
|
};
|
38
|
-
export {
|
43
|
+
export {
|
44
|
+
getTailwindConfig
|
45
|
+
};
|
package/dist/js/modern/utils.js
CHANGED
@@ -1,6 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
var __async = (__this, __arguments, generator) => {
|
2
|
+
return new Promise((resolve, reject) => {
|
3
|
+
var fulfilled = (value) => {
|
4
|
+
try {
|
5
|
+
step(generator.next(value));
|
6
|
+
} catch (e) {
|
7
|
+
reject(e);
|
8
|
+
}
|
9
|
+
};
|
10
|
+
var rejected = (value) => {
|
11
|
+
try {
|
12
|
+
step(generator.throw(value));
|
13
|
+
} catch (e) {
|
14
|
+
reject(e);
|
15
|
+
}
|
16
|
+
};
|
17
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
18
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
19
|
+
});
|
20
|
+
};
|
21
|
+
import path from "path";
|
22
|
+
import { fs } from "@modern-js/utils";
|
23
|
+
const template = (configPath) => `
|
4
24
|
function _interopRequireDefault(obj) {
|
5
25
|
return obj && obj.__esModule ? obj : { default: obj };
|
6
26
|
}
|
@@ -20,13 +40,17 @@ module.exports = {
|
|
20
40
|
...tailwindcss,
|
21
41
|
};
|
22
42
|
`;
|
23
|
-
|
24
|
-
const depName =
|
25
|
-
const packageJson = (
|
43
|
+
const checkTwinMacroNotExist = (appDirectory) => __async(void 0, null, function* () {
|
44
|
+
const depName = "twin.macro";
|
45
|
+
const packageJson = (yield fs.readJSON(path.join(appDirectory, "package.json"), {
|
26
46
|
throws: false
|
27
47
|
})) || {};
|
28
|
-
if (typeof packageJson.dependencies ===
|
48
|
+
if (typeof packageJson.dependencies === "object" && packageJson.dependencies[depName] || typeof packageJson.devDependencies === "object" && packageJson.devDependencies[depName]) {
|
29
49
|
return false;
|
30
50
|
}
|
31
51
|
return true;
|
32
|
-
};
|
52
|
+
});
|
53
|
+
export {
|
54
|
+
checkTwinMacroNotExist,
|
55
|
+
template
|
56
|
+
};
|
package/dist/js/node/cli.js
CHANGED
@@ -1,133 +1,199 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Object.
|
4
|
-
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
21
|
+
mod
|
22
|
+
));
|
23
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
24
|
+
var __async = (__this, __arguments, generator) => {
|
25
|
+
return new Promise((resolve, reject) => {
|
26
|
+
var fulfilled = (value) => {
|
27
|
+
try {
|
28
|
+
step(generator.next(value));
|
29
|
+
} catch (e) {
|
30
|
+
reject(e);
|
31
|
+
}
|
32
|
+
};
|
33
|
+
var rejected = (value) => {
|
34
|
+
try {
|
35
|
+
step(generator.throw(value));
|
36
|
+
} catch (e) {
|
37
|
+
reject(e);
|
38
|
+
}
|
39
|
+
};
|
40
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
41
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
42
|
+
});
|
43
|
+
};
|
44
|
+
var cli_exports = {};
|
45
|
+
__export(cli_exports, {
|
46
|
+
default: () => cli_default,
|
47
|
+
getRandomTwConfigFileName: () => getRandomTwConfigFileName
|
5
48
|
});
|
6
|
-
|
7
|
-
var
|
8
|
-
var
|
9
|
-
var
|
10
|
-
var
|
11
|
-
var
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
49
|
+
module.exports = __toCommonJS(cli_exports);
|
50
|
+
var import_path = __toESM(require("path"));
|
51
|
+
var import_utils = require("@modern-js/utils");
|
52
|
+
var import_cli = __toESM(require("./design-token/cli"));
|
53
|
+
var import_tailwind = require("./tailwind");
|
54
|
+
var import_utils2 = require("./utils");
|
55
|
+
const supportCssInJsLibrary = "styled-components";
|
56
|
+
const getRandomTwConfigFileName = (internalDirectory) => {
|
57
|
+
return (0, import_utils.slash)(
|
58
|
+
import_path.default.join(
|
59
|
+
internalDirectory,
|
60
|
+
`tailwind.config.${Date.now()}.${(0, import_utils.nanoid)()}.js`
|
61
|
+
)
|
62
|
+
);
|
19
63
|
};
|
20
|
-
|
21
|
-
|
22
|
-
pluginName
|
23
|
-
} = {
|
24
|
-
pluginName: '@modern-js/plugin-tailwindcss'
|
64
|
+
var cli_default = ({ pluginName } = {
|
65
|
+
pluginName: "@modern-js/plugin-tailwindcss"
|
25
66
|
}) => ({
|
26
|
-
name:
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
let internalTwConfigPath = '';
|
37
|
-
// When reinstalling dependencies, most of the time the project will be restarted
|
38
|
-
const notHaveTwinMacro = await (0, _utils2.checkTwinMacroNotExist)(appDirectory);
|
67
|
+
name: "@modern-js/plugin-tailwindcss",
|
68
|
+
usePlugins: [
|
69
|
+
(0, import_cli.default)({
|
70
|
+
pluginName
|
71
|
+
})
|
72
|
+
],
|
73
|
+
setup: (api) => __async(void 0, null, function* () {
|
74
|
+
const { appDirectory, internalDirectory } = api.useAppContext();
|
75
|
+
let internalTwConfigPath = "";
|
76
|
+
const notHaveTwinMacro = yield (0, import_utils2.checkTwinMacroNotExist)(appDirectory);
|
39
77
|
return {
|
40
78
|
prepare() {
|
41
79
|
if (notHaveTwinMacro) {
|
42
80
|
return;
|
43
81
|
}
|
44
82
|
internalTwConfigPath = getRandomTwConfigFileName(internalDirectory);
|
45
|
-
const globPattern = (0,
|
46
|
-
|
83
|
+
const globPattern = (0, import_utils.slash)(
|
84
|
+
import_path.default.join(appDirectory, import_utils.CONFIG_CACHE_DIR, "*.cjs")
|
85
|
+
);
|
86
|
+
const files = import_utils.globby.sync(globPattern, {
|
47
87
|
absolute: true
|
48
88
|
});
|
49
89
|
if (files.length > 0) {
|
50
|
-
|
90
|
+
import_utils.fs.writeFileSync(
|
91
|
+
internalTwConfigPath,
|
92
|
+
(0, import_utils2.template)(files[files.length - 1]),
|
93
|
+
"utf-8"
|
94
|
+
);
|
51
95
|
}
|
52
96
|
},
|
53
97
|
validateSchema() {
|
54
|
-
return
|
98
|
+
return import_utils.PLUGIN_SCHEMAS["@modern-js/plugin-tailwindcss"];
|
55
99
|
},
|
56
100
|
config() {
|
57
101
|
return {
|
58
102
|
tools: {
|
59
|
-
|
60
|
-
|
61
|
-
postcss: config => {
|
62
|
-
var _modernConfig$tools, _modernConfig$source;
|
103
|
+
postcss: (config) => {
|
104
|
+
var _a, _b;
|
63
105
|
const modernConfig = api.useResolvedConfigContext();
|
64
|
-
const tailwindConfig = (0,
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
106
|
+
const tailwindConfig = (0, import_tailwind.getTailwindConfig)(
|
107
|
+
(_a = modernConfig == null ? void 0 : modernConfig.tools) == null ? void 0 : _a.tailwindcss,
|
108
|
+
(_b = modernConfig == null ? void 0 : modernConfig.source) == null ? void 0 : _b.designSystem,
|
109
|
+
{
|
110
|
+
pureConfig: {
|
111
|
+
content: [
|
112
|
+
"./config/html/**/*.html",
|
113
|
+
"./config/html/**/*.ejs",
|
114
|
+
"./config/html/**/*.hbs",
|
115
|
+
"./src/**/*.js",
|
116
|
+
"./src/**/*.jsx",
|
117
|
+
"./src/**/*.ts",
|
118
|
+
"./src/**/*.tsx",
|
119
|
+
"./storybook/**/*",
|
120
|
+
"./styles/**/*.less",
|
121
|
+
"./styles/**/*.css",
|
122
|
+
"./styles/**/*.sass",
|
123
|
+
"./styles/**/*.scss"
|
124
|
+
]
|
125
|
+
}
|
69
126
|
}
|
70
|
-
|
127
|
+
);
|
71
128
|
if (Array.isArray(config.postcssOptions.plugins)) {
|
72
|
-
config.postcssOptions.plugins.push(
|
129
|
+
config.postcssOptions.plugins.push(
|
130
|
+
require("tailwindcss")(tailwindConfig)
|
131
|
+
);
|
73
132
|
} else {
|
74
|
-
config.postcssOptions.plugins = [
|
133
|
+
config.postcssOptions.plugins = [
|
134
|
+
require("tailwindcss")(tailwindConfig)
|
135
|
+
];
|
75
136
|
}
|
76
137
|
},
|
77
|
-
babel(
|
78
|
-
var _config$plugins;
|
138
|
+
babel(_, { addPlugins }) {
|
79
139
|
if (notHaveTwinMacro) {
|
80
140
|
return;
|
81
141
|
}
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
if (Array.isArray(plugin) && plugin[0]) {
|
90
|
-
const pluginTarget = plugin[0];
|
91
|
-
let pluginOptions = plugin[1];
|
92
|
-
if (typeof pluginTarget === 'string' &&
|
93
|
-
// TODO: use babel chain
|
94
|
-
(0, _utils.slash)(pluginTarget).includes('compiled/babel-plugin-macros')) {
|
95
|
-
if (pluginOptions) {
|
96
|
-
pluginOptions = _objectSpread(_objectSpread({}, pluginOptions), twinConfig);
|
97
|
-
} else {
|
98
|
-
plugin.push(twinConfig);
|
142
|
+
addPlugins([
|
143
|
+
[
|
144
|
+
require.resolve("babel-plugin-macros"),
|
145
|
+
{
|
146
|
+
twin: {
|
147
|
+
preset: supportCssInJsLibrary,
|
148
|
+
config: internalTwConfigPath
|
99
149
|
}
|
100
|
-
return true;
|
101
150
|
}
|
102
|
-
|
103
|
-
|
104
|
-
});
|
151
|
+
]
|
152
|
+
]);
|
105
153
|
}
|
106
154
|
}
|
107
155
|
};
|
108
156
|
},
|
109
|
-
beforeBuildTask({
|
110
|
-
config
|
111
|
-
}) {
|
157
|
+
beforeBuildTask({ config }) {
|
112
158
|
const modernConfig = api.useResolvedConfigContext();
|
113
|
-
const {
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
159
|
+
const { designSystem } = modernConfig;
|
160
|
+
const tailwindConfig = (0, import_tailwind.getTailwindConfig)(
|
161
|
+
config.style.tailwindCss,
|
162
|
+
designSystem,
|
163
|
+
{
|
164
|
+
pureConfig: {
|
165
|
+
content: [
|
166
|
+
"./config/html/**/*.html",
|
167
|
+
"./config/html/**/*.ejs",
|
168
|
+
"./config/html/**/*.hbs",
|
169
|
+
"./src/**/*.js",
|
170
|
+
"./src/**/*.jsx",
|
171
|
+
"./src/**/*.ts",
|
172
|
+
"./src/**/*.tsx",
|
173
|
+
"./storybook/**/*",
|
174
|
+
"./styles/**/*.less",
|
175
|
+
"./styles/**/*.css",
|
176
|
+
"./styles/**/*.sass",
|
177
|
+
"./styles/**/*.scss"
|
178
|
+
]
|
179
|
+
}
|
121
180
|
}
|
122
|
-
|
181
|
+
);
|
123
182
|
if (Array.isArray(config.style.postcss.plugins)) {
|
124
|
-
config.style.postcss.plugins.push(
|
183
|
+
config.style.postcss.plugins.push(
|
184
|
+
require("tailwindcss")(tailwindConfig)
|
185
|
+
);
|
125
186
|
} else {
|
126
|
-
config.style.postcss.plugins = [
|
187
|
+
config.style.postcss.plugins = [
|
188
|
+
require("tailwindcss")(tailwindConfig)
|
189
|
+
];
|
127
190
|
}
|
128
191
|
return config;
|
129
192
|
}
|
130
193
|
};
|
131
|
-
}
|
194
|
+
})
|
195
|
+
});
|
196
|
+
// Annotate the CommonJS export names for ESM import in node:
|
197
|
+
0 && (module.exports = {
|
198
|
+
getRandomTwConfigFileName
|
132
199
|
});
|
133
|
-
exports.default = _default;
|