mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
[ci] npm run format
This commit is contained in:
parent
eb984559a8
commit
46a6ba6093
2 changed files with 16 additions and 22 deletions
|
@ -302,26 +302,20 @@ async function createSnowpack(astroConfig: AstroConfig, options: CreateSnowpackO
|
||||||
export async function createRuntime(astroConfig: AstroConfig, { mode, logging }: RuntimeOptions): Promise<AstroRuntime> {
|
export async function createRuntime(astroConfig: AstroConfig, { mode, logging }: RuntimeOptions): Promise<AstroRuntime> {
|
||||||
const resolvePackageUrl = async (pkgName: string) => frontendSnowpack.getUrlForPackage(pkgName);
|
const resolvePackageUrl = async (pkgName: string) => frontendSnowpack.getUrlForPackage(pkgName);
|
||||||
|
|
||||||
const { snowpack: backendSnowpack, snowpackRuntime: backendSnowpackRuntime, snowpackConfig: backendSnowpackConfig } = await createSnowpack(
|
const { snowpack: backendSnowpack, snowpackRuntime: backendSnowpackRuntime, snowpackConfig: backendSnowpackConfig } = await createSnowpack(astroConfig, {
|
||||||
astroConfig,
|
|
||||||
{
|
|
||||||
env: {
|
env: {
|
||||||
astro: true
|
astro: true,
|
||||||
},
|
},
|
||||||
mode,
|
mode,
|
||||||
resolvePackageUrl
|
resolvePackageUrl,
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
const { snowpack: frontendSnowpack, snowpackRuntime: frontendSnowpackRuntime, snowpackConfig: frontendSnowpackConfig } = await createSnowpack(
|
const { snowpack: frontendSnowpack, snowpackRuntime: frontendSnowpackRuntime, snowpackConfig: frontendSnowpackConfig } = await createSnowpack(astroConfig, {
|
||||||
astroConfig,
|
|
||||||
{
|
|
||||||
env: {
|
env: {
|
||||||
astro: false
|
astro: false,
|
||||||
},
|
},
|
||||||
mode
|
mode,
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
const runtimeConfig: RuntimeConfig = {
|
const runtimeConfig: RuntimeConfig = {
|
||||||
astroConfig,
|
astroConfig,
|
||||||
|
|
|
@ -15,7 +15,7 @@ DynamicComponents('Loads client-only packages', async ({ runtime }) => {
|
||||||
// Grab the react-dom import
|
// Grab the react-dom import
|
||||||
const exp = /import\("(.+?)"\)/g;
|
const exp = /import\("(.+?)"\)/g;
|
||||||
let match, reactDomURL;
|
let match, reactDomURL;
|
||||||
while(match = exp.exec(result.contents)) {
|
while ((match = exp.exec(result.contents))) {
|
||||||
if (match[1].includes('react-dom')) {
|
if (match[1].includes('react-dom')) {
|
||||||
reactDomURL = match[1];
|
reactDomURL = match[1];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue