web: allow @ imports

This commit is contained in:
Tulir Asokan 2024-10-13 17:11:43 +03:00
parent cd768d6f2e
commit 4eec9f5eb6
4 changed files with 13 additions and 1 deletions

View file

@ -2,5 +2,5 @@
cd web > /dev/null
if [[ -f "./node_modules/.bin/eslint" ]]; then
ARGS=("$@")
eslint ${ARGS[@]/#web\// }
eslint --fix ${ARGS[@]/#web\// }
fi

View file

@ -37,6 +37,10 @@ export default tseslint.config(
"named": true,
"warnOnUnassignedImports": true,
"pathGroups": [{
"pattern": "@/**",
"group": "parent",
"position": "before",
}, {
"pattern": "*.svg?react",
"patternOptions": {"matchBase": true},
"group": "sibling",

View file

@ -7,6 +7,9 @@
"DOM",
"DOM.Iterable"
],
"paths": {
"@/*": ["./src/*"]
},
"module": "ESNext",
"skipLibCheck": true,
/* Bundler mode */

View file

@ -13,6 +13,11 @@ export default defineConfig({
},
}),
],
resolve: {
alias: {
"@": "/src",
},
},
server: {
proxy: {
"/_gomuks/websocket": {