Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed May 9, 2024
1 parent 4161a2a commit d8fe43f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions packages/astro/src/actions/index.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import { mkdir, readFile, writeFile } from 'node:fs/promises';
import type { Plugin as VitePlugin } from 'vite';
import type { AstroIntegration } from '../@types/astro.js';
import { ACTIONS_TYPES_FILE, RESOLVED_VIRTUAL_MODULE_ID, VIRTUAL_MODULE_ID } from './consts.js';
import { viteID } from '../core/util.js';

import { ACTIONS_TYPES_FILE, RESOLVED_VIRTUAL_MODULE_ID, VIRTUAL_MODULE_ID } from './consts.js';

export default function astroActions(): AstroIntegration {
return {
name: VIRTUAL_MODULE_ID,
hooks: {
async 'astro:config:setup'(params) {
const stringifiedActionsImport = JSON.stringify(viteID(new URL('./actions', params.config.srcDir)));
const stringifiedActionsImport = JSON.stringify(
viteID(new URL('./actions', params.config.srcDir))
);
params.updateConfig({
vite: {
define: {
Expand Down
4 changes: 1 addition & 3 deletions packages/astro/src/vite-plugin-astro-server/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ export async function matchRoute(
// Try without `.html` extensions or `index.html` in request URLs to mimic
// routing behavior in production builds. This supports both file and directory
// build formats, and is necessary based on how the manifest tracks build targets.
const altPathname = pathname
.replace(/\/index\.html$/, '/')
.replace(/\.html$/, '');
const altPathname = pathname.replace(/\/index\.html$/, '/').replace(/\.html$/, '');

if (altPathname !== pathname) {
return await matchRoute(altPathname, manifestData, pipeline);
Expand Down

0 comments on commit d8fe43f

Please sign in to comment.