Skip to content

Commit

Permalink
Merge pull request #254 from AkariNext/feat/live-markdown-editor
Browse files Browse the repository at this point in the history
feat: remix-flat-routes を使ったフォルダ構造に変更
  • Loading branch information
yupix authored Sep 4, 2024
2 parents 2c09f74 + f8b30c3 commit 27d10da
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/routes/blog.$slug.tsx → app/routes/blog+/$slug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import {
json,
} from '@remix-run/node';

import '../mdx.css';
import '~/mdx.css';
import { getSocialIcon } from '~/lib/utils';
import { getBlogPost } from '../lib/blog.server';
import { getBlogPost } from '../../lib/blog.server';
import { InlineIcon } from '@iconify/react/dist/iconify.js';
import { Avatar } from '~/components/Avatar';

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 12 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,26 @@ import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import arraybuffer from 'vite-plugin-arraybuffer';
import { devErrorBoundary } from '@metronome-sh/dev-error-boundary';
import {flatRoutes} from 'remix-flat-routes';

installGlobals({nativeFetch: true});
installGlobals({ nativeFetch: true });

export default defineConfig({
plugins: [
mdx({
remarkPlugins: [remarkFrontmatter, remarkMdxFrontmatter],
}),
arraybuffer(),
remix({ serverModuleFormat: 'esm', future: {unstable_singleFetch: true} }),
remix({
ignoredRouteFiles: ['**/*'],
serverModuleFormat: 'esm',
future: { unstable_singleFetch: true },
routes: async (defineRoutes) => {
return flatRoutes('routes', defineRoutes, {
ignoredRouteFiles: ['.*', '**/*.css', '**/__*.*'],
});
},
}),
tsconfigPaths(),
// devErrorBoundary(),
],
Expand Down

0 comments on commit 27d10da

Please sign in to comment.