[ci] format
This commit is contained in:
parent
efccebb964
commit
1aeb1d0a00
4 changed files with 16 additions and 9 deletions
|
@ -381,7 +381,10 @@ export default function createPlugin({ config, logging }: AstroPluginOptions): v
|
|||
removeViteHttpMiddleware(viteServer.middlewares);
|
||||
|
||||
// Push this middleware to the front of the stack so that it can intercept responses.
|
||||
viteServer.middlewares.stack.unshift({ route: '', handle: forceTextCSSForStylesMiddleware });
|
||||
viteServer.middlewares.stack.unshift({
|
||||
route: '',
|
||||
handle: forceTextCSSForStylesMiddleware,
|
||||
});
|
||||
viteServer.middlewares.use(async (req, res) => {
|
||||
if (!req.url || !req.method) {
|
||||
throw new Error('Incomplete request');
|
||||
|
|
|
@ -22,7 +22,9 @@ describe('HMR - CSS', () => {
|
|||
});
|
||||
|
||||
it('Timestamp URL used by Vite gets the right mime type', async () => {
|
||||
let res = await fixture.fetch('/src/pages/index.astro?astro=&type=style&index=0&lang.css=&t=1653657441095');
|
||||
let res = await fixture.fetch(
|
||||
'/src/pages/index.astro?astro=&type=style&index=0&lang.css=&t=1653657441095'
|
||||
);
|
||||
let headers = res.headers;
|
||||
expect(headers.get('content-type')).to.equal('text/css');
|
||||
});
|
||||
|
|
|
@ -2,7 +2,9 @@ async function polyfill() {
|
|||
const { hydrateShadowRoots } = await import(
|
||||
'@webcomponents/template-shadowroot/template-shadowroot.js'
|
||||
);
|
||||
window.addEventListener('DOMContentLoaded', () => hydrateShadowRoots(document.body), { once: true });
|
||||
window.addEventListener('DOMContentLoaded', () => hydrateShadowRoots(document.body), {
|
||||
once: true,
|
||||
});
|
||||
}
|
||||
|
||||
const polyfillCheckEl = new DOMParser()
|
||||
|
|
Loading…
Reference in a new issue