Skip to content

Commit

Permalink
read assets dir from config
Browse files Browse the repository at this point in the history
  • Loading branch information
jarle committed Aug 16, 2024
1 parent c68b06d commit c364a4a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 3 additions & 2 deletions packages/adapter/src/hooks/build_hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ export default async function remixBuildHook({ logger }: Parameters<AssemblerHoo
const config = await resolveViteConfig()
// const cli = await import('@remix-run/dev')
// await cli.run(['vite:build'])
const source = app.makePath('build', 'remix', 'client')
const target = app.makePath('build', 'public', 'assets', config?.base ?? '/')
const assetsDir = config?.build?.assetsDir ?? 'assets'
const source = app.makePath('build', 'remix', 'client', assetsDir)
const target = app.makePath('build', 'public', assetsDir, config?.base ?? '/')
moveDirectorySync(source, target)
}

Expand Down
5 changes: 0 additions & 5 deletions packages/reference-app/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
import adonisjs from '@adonisjs/vite/client'
import { vitePlugin as remix } from '@remix-run/dev'
import { defineConfig } from 'vite'

export default defineConfig(({ isSsrBuild }) => ({
base: '/assets/',
plugins: [
remix({
appDirectory: 'resources/remix_app',
buildDirectory: 'build/remix',
serverBuildFile: 'server.js',
}),
adonisjs({
entrypoints: [],
}),
],
optimizeDeps: {
esbuildOptions: isSsrBuild
Expand Down

0 comments on commit c364a4a

Please sign in to comment.