@plumeria/unplugin 21.0.0 → 21.1.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/core.js CHANGED
@@ -154,6 +154,9 @@ const unpluginFactory = (options = {}, unpluginMeta) => {
154
154
  this.addWatchFile(depPath);
155
155
  }
156
156
  };
157
+ const relative = path.relative(viteRoot, baseId).replace(/\\/g, '/');
158
+ const insideRoot = !relative.startsWith('..') && !path.isAbsolute(relative);
159
+ const cwd = insideRoot ? viteRoot : path.dirname(baseId);
157
160
  const { code: transformedSource } = transformSource({
158
161
  source,
159
162
  moduleId: id,
@@ -163,16 +166,15 @@ const unpluginFactory = (options = {}, unpluginMeta) => {
163
166
  classProp,
164
167
  propertyPolicy,
165
168
  isDev,
169
+ cwd,
166
170
  addDependency,
167
171
  });
168
- const relative = path.relative(viteRoot, baseId).replace(/\\/g, '/');
169
- const insideRoot = !relative.startsWith('..') && !path.isAbsolute(relative);
170
172
  const filePath = path.resolve(baseId);
171
173
  const fileCss = compileCSS({
172
174
  include: [],
173
175
  exclude: [],
174
176
  files: [filePath],
175
- cwd: insideRoot ? viteRoot : path.dirname(baseId),
177
+ cwd,
176
178
  styleProp,
177
179
  withoutLogicalProperties: options.withoutLogicalProperties,
178
180
  withoutPhysicalProperties: options.withoutPhysicalProperties,
package/dist/core.mjs CHANGED
@@ -115,6 +115,9 @@ export const unpluginFactory = (options = {}, unpluginMeta) => {
115
115
  this.addWatchFile(depPath);
116
116
  }
117
117
  };
118
+ const relative = path.relative(viteRoot, baseId).replace(/\\/g, '/');
119
+ const insideRoot = !relative.startsWith('..') && !path.isAbsolute(relative);
120
+ const cwd = insideRoot ? viteRoot : path.dirname(baseId);
118
121
  const { code: transformedSource } = transformSource({
119
122
  source,
120
123
  moduleId: id,
@@ -124,16 +127,15 @@ export const unpluginFactory = (options = {}, unpluginMeta) => {
124
127
  classProp,
125
128
  propertyPolicy,
126
129
  isDev,
130
+ cwd,
127
131
  addDependency,
128
132
  });
129
- const relative = path.relative(viteRoot, baseId).replace(/\\/g, '/');
130
- const insideRoot = !relative.startsWith('..') && !path.isAbsolute(relative);
131
133
  const filePath = path.resolve(baseId);
132
134
  const fileCss = compileCSS({
133
135
  include: [],
134
136
  exclude: [],
135
137
  files: [filePath],
136
- cwd: insideRoot ? viteRoot : path.dirname(baseId),
138
+ cwd,
137
139
  styleProp,
138
140
  withoutLogicalProperties: options.withoutLogicalProperties,
139
141
  withoutPhysicalProperties: options.withoutPhysicalProperties,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/unplugin",
3
- "version": "21.0.0",
3
+ "version": "21.1.1",
4
4
  "description": "Universal Plumeria plugin for various build tools",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",
@@ -93,8 +93,8 @@
93
93
  "dependencies": {
94
94
  "@rollup/pluginutils": "^5.4.0",
95
95
  "unplugin": "^3.0.0",
96
- "@plumeria/eslint-plugin": "21.0.0",
97
- "@plumeria/compiler": "21.0.0"
96
+ "@plumeria/compiler": "21.1.1",
97
+ "@plumeria/eslint-plugin": "21.1.1"
98
98
  },
99
99
  "devDependencies": {
100
100
  "vite": "^8.0.13"