This repository has been archived by the owner on Nov 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #171 from eyelidlessness/refactor/dom-compat
Refactor transform to be isomorphic (Node/web compatibility)
- Loading branch information
Showing
76 changed files
with
13,234 additions
and
1,009 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,4 @@ Thumbs.db | |
test-coverage | ||
coverage.shield.badge.md | ||
dist | ||
.benchmarks.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1 @@ | ||
// @ts-check | ||
|
||
import { createServer } from 'vite'; | ||
import { VitePluginNode } from 'vite-plugin-node'; | ||
import { | ||
config, | ||
external, | ||
resolvePath, | ||
rootDir, | ||
} from './config/build.shared.js'; | ||
|
||
const appPath = resolvePath('./app.ts'); | ||
|
||
const init = async () => { | ||
/** @type {import('vite').UserConfig} */ | ||
const baseOptions = { | ||
mode: 'development', | ||
build: { | ||
rollupOptions: { | ||
external, | ||
}, | ||
}, | ||
optimizeDeps: { | ||
disabled: true, | ||
}, | ||
root: rootDir, | ||
ssr: { | ||
target: 'node', | ||
}, | ||
}; | ||
|
||
const servers = await Promise.all([ | ||
createServer({ | ||
...baseOptions, | ||
configFile: false, | ||
plugins: VitePluginNode({ | ||
adapter: 'express', | ||
appPath, | ||
exportName: 'app', | ||
tsCompiler: 'esbuild', | ||
}), | ||
server: { | ||
port: config.port, | ||
}, | ||
}), | ||
createServer({ | ||
...baseOptions, | ||
configFile: false, | ||
publicDir: resolvePath('./test/forms'), | ||
server: { | ||
port: 8081, | ||
}, | ||
}), | ||
]); | ||
|
||
await Promise.all(servers.map((server) => server.listen())); | ||
|
||
servers.forEach((server) => { | ||
server.printUrls(); | ||
}); | ||
}; | ||
|
||
init(); | ||
import './dist/enketo-transformer/app.cjs'; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.