[ci] yarn format
This commit is contained in:
parent
69d5b70900
commit
0a112e1f56
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ async function compile(config: AstroConfig, filename: string, source: string, vi
|
||||||
let prefix = '';
|
let prefix = '';
|
||||||
// In the static build, strip away at-imports so that they can be resolved
|
// In the static build, strip away at-imports so that they can be resolved
|
||||||
// by the pseudo-module that gets created.
|
// by the pseudo-module that gets created.
|
||||||
if(config.buildOptions.experimentalStaticBuild) {
|
if (config.buildOptions.experimentalStaticBuild) {
|
||||||
value = value.replace(/(?:@import)\s(?:url\()?\s?["\'](.*?)["\']\s?\)?(?:[^;]*);?/gi, (match) => {
|
value = value.replace(/(?:@import)\s(?:url\()?\s?["\'](.*?)["\']\s?\)?(?:[^;]*);?/gi, (match) => {
|
||||||
prefix += match;
|
prefix += match;
|
||||||
// Replace with an empty string of the same length, to preserve source maps.
|
// Replace with an empty string of the same length, to preserve source maps.
|
||||||
|
@ -79,7 +79,7 @@ async function compile(config: AstroConfig, filename: string, source: string, vi
|
||||||
map = result.map.toString();
|
map = result.map.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const code = prefix += result.code;
|
const code = (prefix += result.code);
|
||||||
return { code, map };
|
return { code, map };
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// save error to throw in plugin context
|
// save error to throw in plugin context
|
||||||
|
|
Loading…
Add table
Reference in a new issue