chore(desktop): build config — keep tsc emit out of src, gitignore artifacts
parent
a57b33782e
commit
d14bf23fa3
|
|
@ -68,6 +68,17 @@ environments/benchmarks/evals/
|
||||||
hermes_cli/web_dist/
|
hermes_cli/web_dist/
|
||||||
apps/desktop/build/
|
apps/desktop/build/
|
||||||
apps/desktop/dist/
|
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/
|
apps/desktop/release/
|
||||||
*.tsbuildinfo
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,25 @@ export default [
|
||||||
react: { version: 'detect' }
|
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'],
|
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
|
||||||
ignores: ['**/node_modules/**', '**/dist/**'],
|
ignores: ['**/node_modules/**', '**/dist/**'],
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"paths": {
|
"paths": {
|
||||||
"@/*": ["./src/*"],
|
"@/*": ["./src/*"],
|
||||||
|
"@hermes/plugin-sdk": ["./src/sdk/index.ts"],
|
||||||
"@hermes/shared": ["../shared/src/index.ts"]
|
"@hermes/shared": ["../shared/src/index.ts"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ export default defineConfig({
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
'@': path.resolve(__dirname, './src'),
|
'@': path.resolve(__dirname, './src'),
|
||||||
|
'@hermes/plugin-sdk': path.resolve(__dirname, './src/sdk/index.ts'),
|
||||||
'@hermes/shared': path.resolve(__dirname, '../shared/src'),
|
'@hermes/shared': path.resolve(__dirname, '../shared/src'),
|
||||||
react: path.resolve(__dirname, '../../node_modules/react'),
|
react: path.resolve(__dirname, '../../node_modules/react'),
|
||||||
'react-dom': path.resolve(__dirname, '../../node_modules/react-dom'),
|
'react-dom': path.resolve(__dirname, '../../node_modules/react-dom'),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue