fix(vite): route css import (#3438)
Fixes https://github.com/denoland/fresh/issues/3426
This commit is contained in:
@@ -81,7 +81,7 @@ export function devServer(): Plugin[] {
|
||||
url.pathname !== "/__inspect" &&
|
||||
res.headers.get("Content-Type")?.includes("text/html")
|
||||
) {
|
||||
const collected = await collectCss2(
|
||||
const collected = await collectCss(
|
||||
"fresh:client-entry",
|
||||
server.environments.client,
|
||||
);
|
||||
@@ -132,7 +132,7 @@ export function devServer(): Plugin[] {
|
||||
];
|
||||
}
|
||||
|
||||
async function collectCss2(
|
||||
async function collectCss(
|
||||
id: string,
|
||||
env: DevEnvironment,
|
||||
) {
|
||||
|
||||
@@ -351,7 +351,7 @@ export function serverSnapshot(options: ResolvedFreshViteConfig): Plugin[] {
|
||||
},
|
||||
transform: {
|
||||
filter: {
|
||||
id: /\.module\.(css|less|sass)(\?.*)?$/,
|
||||
id: /\.(css|less|sass|scss)(\?.*)?$/,
|
||||
},
|
||||
handler(_code, id, _options) {
|
||||
if (server) {
|
||||
|
||||
Reference in New Issue
Block a user