uniwind-plugin-next 1.1.1 → 1.1.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.
@@ -1,5 +1,4 @@
1
1
  export default function clientDirectiveLoader(source) {
2
- console.log(this.resourcePath);
3
2
  // Don't add the directive if it's already present
4
3
  if (source.startsWith('"use client"') || source.startsWith("'use client'")) {
5
4
  return source;
package/dist/index.cjs CHANGED
@@ -257,12 +257,12 @@ const generateCSSForVariants = () => {
257
257
 
258
258
  //#endregion
259
259
  //#region src/webpack/uniwind/src/css/index.ts
260
- const dirname = typeof __dirname !== "undefined" ? __dirname : __dirname;
260
+ const dirname$1 = typeof __dirname !== "undefined" ? __dirname : __dirname;
261
261
  const buildCSS = async (themes, input) => {
262
262
  const variants$1 = generateCSSForVariants();
263
263
  const insets = generateCSSForInsets();
264
264
  const themesCSS = await generateCSSForThemes(themes, input);
265
- const cssFile = path.default.join(dirname, "../../uniwind.css");
265
+ const cssFile = path.default.join(dirname$1, "../../uniwind.css");
266
266
  if ((fs.default.existsSync(cssFile) ? fs.default.readFileSync(cssFile, "utf-8") : "") === cssFile) return;
267
267
  fs.default.writeFileSync(cssFile, [
268
268
  variants$1,
@@ -302,6 +302,7 @@ const stringifyThemes = (themes = []) => `[${themes.map((theme) => `'${theme}'`)
302
302
 
303
303
  //#endregion
304
304
  //#region src/webpack/UniwindWebpackPlugin.ts
305
+ const dirname = typeof __dirname !== "undefined" ? __dirname : __dirname;
305
306
  var UniwindWebpackPlugin = class {
306
307
  constructor({ cssEntryFile, extraThemes = [], dtsFile = "uniwind-types.d.ts" }) {
307
308
  this.hasRun = false;
@@ -327,7 +328,7 @@ var UniwindWebpackPlugin = class {
327
328
  test: /config\.c?js$/,
328
329
  include: /uniwind[\/\\]dist/,
329
330
  use: [{
330
- loader: path.default.resolve(__dirname, "configInjectionLoader.js"),
331
+ loader: path.default.resolve(dirname, "configInjectionLoader.js"),
331
332
  options: { stringifiedThemes: stringifyThemes(this.themes) }
332
333
  }]
333
334
  });
@@ -335,7 +336,7 @@ var UniwindWebpackPlugin = class {
335
336
  test: /\.js$/,
336
337
  exclude: /index\.js$/,
337
338
  include: /uniwind[\/\\]dist[\/\\]module[\/\\]components[\/\\]web/,
338
- use: [{ loader: path.default.resolve(__dirname, "clientDirectiveLoader.js") }]
339
+ use: [{ loader: path.default.resolve(dirname, "clientDirectiveLoader.js") }]
339
340
  });
340
341
  }
341
342
  };
package/dist/index.mjs CHANGED
@@ -228,12 +228,12 @@ const generateCSSForVariants = () => {
228
228
 
229
229
  //#endregion
230
230
  //#region src/webpack/uniwind/src/css/index.ts
231
- const dirname = typeof __dirname !== "undefined" ? __dirname : import.meta.dirname;
231
+ const dirname$1 = typeof __dirname !== "undefined" ? __dirname : import.meta.dirname;
232
232
  const buildCSS = async (themes, input) => {
233
233
  const variants$1 = generateCSSForVariants();
234
234
  const insets = generateCSSForInsets();
235
235
  const themesCSS = await generateCSSForThemes(themes, input);
236
- const cssFile = path.join(dirname, "../../uniwind.css");
236
+ const cssFile = path.join(dirname$1, "../../uniwind.css");
237
237
  if ((fs.existsSync(cssFile) ? fs.readFileSync(cssFile, "utf-8") : "") === cssFile) return;
238
238
  fs.writeFileSync(cssFile, [
239
239
  variants$1,
@@ -273,6 +273,7 @@ const stringifyThemes = (themes = []) => `[${themes.map((theme) => `'${theme}'`)
273
273
 
274
274
  //#endregion
275
275
  //#region src/webpack/UniwindWebpackPlugin.ts
276
+ const dirname = typeof __dirname !== "undefined" ? __dirname : import.meta.dirname;
276
277
  var UniwindWebpackPlugin = class {
277
278
  constructor({ cssEntryFile, extraThemes = [], dtsFile = "uniwind-types.d.ts" }) {
278
279
  this.hasRun = false;
@@ -298,7 +299,7 @@ var UniwindWebpackPlugin = class {
298
299
  test: /config\.c?js$/,
299
300
  include: /uniwind[\/\\]dist/,
300
301
  use: [{
301
- loader: path.resolve(__dirname, "configInjectionLoader.js"),
302
+ loader: path.resolve(dirname, "configInjectionLoader.js"),
302
303
  options: { stringifiedThemes: stringifyThemes(this.themes) }
303
304
  }]
304
305
  });
@@ -306,7 +307,7 @@ var UniwindWebpackPlugin = class {
306
307
  test: /\.js$/,
307
308
  exclude: /index\.js$/,
308
309
  include: /uniwind[\/\\]dist[\/\\]module[\/\\]components[\/\\]web/,
309
- use: [{ loader: path.resolve(__dirname, "clientDirectiveLoader.js") }]
310
+ use: [{ loader: path.resolve(dirname, "clientDirectiveLoader.js") }]
310
311
  });
311
312
  }
312
313
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uniwind-plugin-next",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "Compatibility plugin for using Uniwind with Next.js",
5
5
  "devDependencies": {
6
6
  "@types/node": "^25.0.3",