Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"@vitest/coverage-v8": "^3.2.4",
"chrome-types": "^0.1.360",
"tailwindcss": "^4.1.14",
"typescript": "^5.9.3",
"typescript": "^7.0.2",
"vite": "^8.2.1",
"vitest": "^3.2.4"
}
Expand Down
213 changes: 207 additions & 6 deletions pnpm-lock.yaml

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

8 changes: 5 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"lib": ["ES2022", "DOM", "DOM.Iterable"],
"module": "ESNext",
"moduleResolution": "bundler",
"types": ["chrome-types", "node"],
// `vite/client` supplies the `*.css` module declarations that the side-effect
// imports of the stylesheet need; TypeScript 7 errors on them otherwise.
"types": ["chrome-types", "node", "vite/client"],
"jsx": "react-jsx",

"strict": true,
Expand All @@ -20,8 +22,8 @@
"allowJs": true,
"noEmit": true,

"baseUrl": ".",
"paths": { "@/*": ["src/*"] }
// TypeScript 7 removed `baseUrl`; path mappings resolve relative to this file.
"paths": { "@/*": ["./src/*"] }
},
"include": ["src", "tests", "scripts", "*.config.ts"]
}
8 changes: 4 additions & 4 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { defineConfig } from 'vite'
// manifest stays a hand-written, greppable file rather than a generated artifact.
export default defineConfig({
plugins: [react(), tailwindcss()],
resolve: { alias: { '@': resolve(__dirname, 'src') } },
resolve: { alias: { '@': resolve(import.meta.dirname, 'src') } },
build: {
outDir: 'dist',
emptyOutDir: true,
Expand All @@ -17,9 +17,9 @@ export default defineConfig({
// HTML entries live at the repo root so they emit as `dist/options.html` and
// `dist/blocked.html` — the exact paths manifest.json names.
input: {
options: resolve(__dirname, 'options.html'),
blocked: resolve(__dirname, 'blocked.html'),
background: resolve(__dirname, 'src/background/index.ts'),
options: resolve(import.meta.dirname, 'options.html'),
blocked: resolve(import.meta.dirname, 'blocked.html'),
background: resolve(import.meta.dirname, 'src/background/index.ts'),
},
output: {
// manifest.json references `background.js` at the package root, so the service
Expand Down
2 changes: 1 addition & 1 deletion vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { defineConfig } from 'vitest/config'
// `environment: 'node'` on purpose: everything under src/core is pure, so there is no
// `chrome` namespace and no DOM to fake. That is the whole point of the core/platform split.
export default defineConfig({
resolve: { alias: { '@': resolve(__dirname, 'src') } },
resolve: { alias: { '@': resolve(import.meta.dirname, 'src') } },
test: {
environment: 'node',
include: ['src/**/*.test.ts'],
Expand Down
Loading