mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-20 15:33:54 +00:00
chore(desktop): build config — keep tsc emit out of src, gitignore artifacts
This commit is contained in:
parent
a57b33782e
commit
d14bf23fa3
4 changed files with 32 additions and 0 deletions
11
.gitignore
vendored
11
.gitignore
vendored
|
|
@ -68,6 +68,17 @@ environments/benchmarks/evals/
|
|||
hermes_cli/web_dist/
|
||||
apps/desktop/build/
|
||||
apps/desktop/dist/
|
||||
|
||||
# tsc-emitted artifacts (a stray `tsc -b` compiles into src/, and vite then
|
||||
# resolves the stale .js OVER the .tsx — never track these)
|
||||
apps/desktop/src/**/*.js
|
||||
apps/desktop/src/**/*.js.map
|
||||
apps/desktop/src/**/*.d.ts
|
||||
!apps/desktop/src/global.d.ts
|
||||
!apps/desktop/src/vite-env.d.ts
|
||||
apps/shared/src/**/*.js
|
||||
apps/shared/src/**/*.js.map
|
||||
apps/shared/src/**/*.d.ts
|
||||
apps/desktop/release/
|
||||
*.tsbuildinfo
|
||||
|
||||
|
|
|
|||
|
|
@ -104,6 +104,25 @@ export default [
|
|||
react: { version: 'detect' }
|
||||
}
|
||||
},
|
||||
{
|
||||
// THE PLUGIN FENCE: plugins speak @hermes/plugin-sdk (+ react), never `@/…`
|
||||
// internals — the same isolation a runtime-fetched published plugin gets,
|
||||
// enforced on bundled ones so the SDK surface stays honest and sufficient.
|
||||
files: ['src/plugins/**/*.{ts,tsx}'],
|
||||
rules: {
|
||||
'no-restricted-imports': [
|
||||
'error',
|
||||
{
|
||||
patterns: [
|
||||
{
|
||||
group: ['@/*', '../*', '@hermes/shared'],
|
||||
message: 'Plugins import only @hermes/plugin-sdk (and react). Missing something? Add it to the SDK.'
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
|
||||
ignores: ['**/node_modules/**', '**/dist/**'],
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
"jsx": "react-jsx",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"],
|
||||
"@hermes/plugin-sdk": ["./src/sdk/index.ts"],
|
||||
"@hermes/shared": ["../shared/src/index.ts"]
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ export default defineConfig({
|
|||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
'@hermes/plugin-sdk': path.resolve(__dirname, './src/sdk/index.ts'),
|
||||
'@hermes/shared': path.resolve(__dirname, '../shared/src'),
|
||||
react: path.resolve(__dirname, '../../node_modules/react'),
|
||||
'react-dom': path.resolve(__dirname, '../../node_modules/react-dom'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue