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.
- package/dist/clientDirectiveLoader.js +0 -1
- package/dist/index.cjs +5 -4
- package/dist/index.mjs +5 -4
- package/package.json +1 -1
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(
|
|
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(
|
|
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(
|
|
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(
|
|
310
|
+
use: [{ loader: path.resolve(dirname, "clientDirectiveLoader.js") }]
|
|
310
311
|
});
|
|
311
312
|
}
|
|
312
313
|
};
|