@tdh-ui/unplugin-tdh-ui 1.2.0 → 1.2.1

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/index.cjs CHANGED
@@ -111,6 +111,13 @@ async function transformStyle(s, options) {
111
111
  const specifiers = esModuleLexer.parse(source)[0].filter(({ n }) => {
112
112
  return n === lib || n === `${lib}/es/components` || n === `${lib}/lib/components`;
113
113
  });
114
+ if (options.styleDeps) {
115
+ specifiers.push(
116
+ ...esModuleLexer.parse(source)[0].filter(
117
+ ({ n }) => n === `${lib}/es` || n === `${lib}/lib`
118
+ )
119
+ );
120
+ }
114
121
  if (specifiers.length === 0) return;
115
122
  const styleImports = specifiers.map((s2) => {
116
123
  const ret = transformImportStyle(s2, source, useSource, {
package/dist/index.mjs CHANGED
@@ -105,6 +105,13 @@ async function transformStyle(s, options) {
105
105
  const specifiers = parse(source)[0].filter(({ n }) => {
106
106
  return n === lib || n === `${lib}/es/components` || n === `${lib}/lib/components`;
107
107
  });
108
+ if (options.styleDeps) {
109
+ specifiers.push(
110
+ ...parse(source)[0].filter(
111
+ ({ n }) => n === `${lib}/es` || n === `${lib}/lib`
112
+ )
113
+ );
114
+ }
108
115
  if (specifiers.length === 0) return;
109
116
  const styleImports = specifiers.map((s2) => {
110
117
  const ret = transformImportStyle(s2, source, useSource, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tdh-ui/unplugin-tdh-ui",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.2.1",
5
5
  "description": "Import TDH UI Base on demand. Support Vite, Webpack, Vue CLI, Rollup and esbuild.",
6
6
  "license": "MIT",
7
7
  "homepage": "",