vite/playground/css-codesplit/main.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
566 B
JavaScript
Raw Normal View History

import './style.css'
import './main.css'
import './order'
import './chunk.css'
import chunkCssUrl from './chunk.css?url'
// use this to not treeshake
globalThis.__test_chunkCssUrl = chunkCssUrl
import('./async.css')
import('./async-js')
import('./inline.css?inline').then((css) => {
document.querySelector('.dynamic-inline').textContent = css.default
})
import('./mod.module.css').then((css) => {
document.querySelector('.dynamic-module').textContent = JSON.stringify(
css.default,
)
document.querySelector('.mod').classList.add(css.default.mod)
})