Skip to content

Commit

Permalink
update @brillout/vite-plugin-server-entry
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Nov 2, 2024
1 parent 211555b commit bf66a43
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
11 changes: 9 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions telefunc/node/vite/loadTelefuncFilesWithVite.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { loadTelefuncFilesWithVite }

import { importServerEntry } from '@brillout/vite-plugin-server-entry/runtime'
import { importServerProductionEntry } from '@brillout/vite-plugin-server-entry/runtime'
import { assert, assertWarning, getNodeEnv, hasProp, isObject, isProduction, isTelefuncFilePath } from '../utils'
import { telefuncFilesGlobFilePath } from './importGlob/telefuncFilesGlobPath'
import { loadTelefuncFilesWithImportBuild } from './plugins/importBuild/loadBuild'
Expand Down Expand Up @@ -36,7 +36,7 @@ async function loadGlobImporter() {
let moduleExports: unknown
moduleExports = await loadTelefuncFilesWithImportBuild()
if (moduleExports === null) {
await importServerEntry()
await importServerProductionEntry()
moduleExports = await loadTelefuncFilesWithImportBuild()
assert(moduleExports)
} else {
Expand Down
6 changes: 3 additions & 3 deletions telefunc/node/vite/plugins/importBuild/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export { importBuild }

import { serverEntryPlugin } from '@brillout/vite-plugin-server-entry/plugin'
import { serverProductionEntryPlugin } from '@brillout/vite-plugin-server-entry/plugin'
import type { Plugin, ResolvedConfig } from 'vite'
import { assert, assertPosixPath, getOutDirAbsolute, projectInfo, toPosixPath } from '../../utils'
import path from 'node:path'
Expand All @@ -17,8 +17,8 @@ function importBuild(): Plugin[] {
config = config_
},
},
...serverEntryPlugin({
getImporterCode: () => {
...serverProductionEntryPlugin({
getServerProductionEntry: () => {
return getImporterCode(config)
},
libraryName: projectInfo.projectName,
Expand Down
2 changes: 1 addition & 1 deletion telefunc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@brillout/import": "^0.2.3",
"@brillout/json-serializer": "^0.5.6",
"@brillout/picocolors": "^1.0.15",
"@brillout/vite-plugin-server-entry": "^0.4.12",
"@brillout/vite-plugin-server-entry": "^0.5.0",
"es-module-lexer": "^1.0.0",
"ts-morph": "^19.0.0"
},
Expand Down

0 comments on commit bf66a43

Please sign in to comment.