vitrify 0.10.2 → 0.10.3
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.
|
@@ -12,7 +12,8 @@ export const prerender = async ({ outDir, templatePath, manifestPath, entryServe
|
|
|
12
12
|
logLevel: 'warn',
|
|
13
13
|
external: true,
|
|
14
14
|
inlineFonts: true,
|
|
15
|
-
preloadFonts: true
|
|
15
|
+
preloadFonts: true,
|
|
16
|
+
preload: 'swap'
|
|
16
17
|
});
|
|
17
18
|
for (const url of paths) {
|
|
18
19
|
const filename = (url.endsWith('/') ? 'index' : url.replace(/^\//g, '')) + '.html';
|
package/dist/index.js
CHANGED
|
@@ -214,18 +214,7 @@ export const baseConfig = async ({ ssr, appDir, publicDir, base = '/', command =
|
|
|
214
214
|
sassVariables = config.vitrify?.sass?.variables || {};
|
|
215
215
|
globalSass = config.vitrify?.sass?.global || [];
|
|
216
216
|
additionalData = config.vitrify?.sass?.additionalData || [];
|
|
217
|
-
return
|
|
218
|
-
css: {
|
|
219
|
-
preprocessorOptions: {
|
|
220
|
-
sass: {
|
|
221
|
-
additionalData: [
|
|
222
|
-
...Object.entries(sassVariables).map(([key, value]) => `${key}: ${value}`),
|
|
223
|
-
...globalSass.map((sass) => `@import '${sass}'`)
|
|
224
|
-
].join('\n')
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
};
|
|
217
|
+
return;
|
|
229
218
|
},
|
|
230
219
|
configureServer(server) {
|
|
231
220
|
server.middlewares.use('/', (req, res, next) => {
|
|
@@ -281,14 +270,12 @@ export const baseConfig = async ({ ssr, appDir, publicDir, base = '/', command =
|
|
|
281
270
|
})
|
|
282
271
|
.join('\n')}`;
|
|
283
272
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
// ].join('\n')
|
|
291
|
-
// }
|
|
273
|
+
else if (id === 'vitrify.sass') {
|
|
274
|
+
return [
|
|
275
|
+
...Object.entries(sassVariables).map(([key, value]) => `${key}: ${value}`),
|
|
276
|
+
...globalSass.map((sass) => `@import '${sass}'`)
|
|
277
|
+
].join('\n');
|
|
278
|
+
}
|
|
292
279
|
// else if (id === 'vitrify.css') {
|
|
293
280
|
// return `${globalCss.map((css) => `@import '${css}'`).join('\n')}`
|
|
294
281
|
// }
|
package/package.json
CHANGED
package/src/node/index.ts
CHANGED
|
@@ -286,20 +286,7 @@ export const baseConfig = async ({
|
|
|
286
286
|
sassVariables = config.vitrify?.sass?.variables || {}
|
|
287
287
|
globalSass = config.vitrify?.sass?.global || []
|
|
288
288
|
additionalData = config.vitrify?.sass?.additionalData || []
|
|
289
|
-
return
|
|
290
|
-
css: {
|
|
291
|
-
preprocessorOptions: {
|
|
292
|
-
sass: {
|
|
293
|
-
additionalData: [
|
|
294
|
-
...Object.entries(sassVariables).map(
|
|
295
|
-
([key, value]) => `${key}: ${value}`
|
|
296
|
-
),
|
|
297
|
-
...globalSass.map((sass) => `@import '${sass}'`)
|
|
298
|
-
].join('\n')
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
}
|
|
289
|
+
return
|
|
303
290
|
},
|
|
304
291
|
configureServer(server) {
|
|
305
292
|
server.middlewares.use('/', (req, res, next) => {
|
|
@@ -351,15 +338,14 @@ export const baseConfig = async ({
|
|
|
351
338
|
return `export { ${deduped.join(',')} } from '${key}';`
|
|
352
339
|
})
|
|
353
340
|
.join('\n')}`
|
|
341
|
+
} else if (id === 'vitrify.sass') {
|
|
342
|
+
return [
|
|
343
|
+
...Object.entries(sassVariables).map(
|
|
344
|
+
([key, value]) => `${key}: ${value}`
|
|
345
|
+
),
|
|
346
|
+
...globalSass.map((sass) => `@import '${sass}'`)
|
|
347
|
+
].join('\n')
|
|
354
348
|
}
|
|
355
|
-
// else if (id === 'vitrify.sass') {
|
|
356
|
-
// return [
|
|
357
|
-
// ...Object.entries(sassVariables).map(
|
|
358
|
-
// ([key, value]) => `${key}: ${value}`
|
|
359
|
-
// ),
|
|
360
|
-
// ...globalSass.map((sass) => `@import '${sass}'`)
|
|
361
|
-
// ].join('\n')
|
|
362
|
-
// }
|
|
363
349
|
// else if (id === 'vitrify.css') {
|
|
364
350
|
// return `${globalCss.map((css) => `@import '${css}'`).join('\n')}`
|
|
365
351
|
// }
|
package/src/vite/vue/main.ts
CHANGED