progress?

This commit is contained in:
Max Leiter 2022-05-02 19:20:17 -07:00
parent 26cfa8d159
commit 85507cee7d
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA
7 changed files with 24 additions and 20 deletions

View file

@ -16,13 +16,12 @@
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"esModuleInterop": true, "esModuleInterop": true,
"baseUrl": "./", "baseUrl": "./",
"paths": { // "paths": {
"@/js/*": ["./js/*"], // "@/js/*": ["./js/*"],
"@/css/*": ["./css/*"], // "@/css/*": ["./css/*"],
"@/img/*": ["./img/*"], // "@/img/*": ["./img/*"],
"@/components/*": ["./components/*"], // "@/components/*": ["./components/*"],
"@/backend/*": ["../src/types/*"] // },
},
"jsx": "preserve" "jsx": "preserve"
} }
} }

View file

@ -12,7 +12,7 @@
}, },
"homepage": "https://thelounge.chat/", "homepage": "https://thelounge.chat/",
"scripts": { "scripts": {
"build": "tsc --resolveJsonModule --esModuleInterop --lib DOM webpack.config.ts && webpack --config webpack.config.js", "build": "webpack",
"coverage": "run-s test:* && nyc --nycrc-path=test/.nycrc-report.json report", "coverage": "run-s test:* && nyc --nycrc-path=test/.nycrc-report.json report",
"dev": "TS_NODE_PROJECT='./src/tsconfig.json' ts-node index start --dev", "dev": "TS_NODE_PROJECT='./src/tsconfig.json' ts-node index start --dev",
"format:prettier": "prettier --write \"**/*.*\"", "format:prettier": "prettier --write \"**/*.*\"",

View file

@ -1,6 +1,6 @@
"use strict"; "use strict";
import Msg from "@src/models/msg"; import Msg from "../../models/msg";
const commands = ["ban", "unban", "banlist", "kickban"]; const commands = ["ban", "unban", "banlist", "kickban"];

View file

@ -21,10 +21,6 @@
"outDir": "dist", "outDir": "dist",
// "resolveJsonModule": true, // "resolveJsonModule": true,
"esModuleInterop": true, "esModuleInterop": true,
"moduleResolution": "node", "moduleResolution": "node"
"paths": {
"@src/*": ["./*"],
"@client/*": ["../client/*"]
}
} }
} }

View file

@ -1,5 +1,9 @@
{ {
"compilerOptions": { "compilerOptions": {
"paths": {
"@src/*": ["src/*"],
"@client/*": ["client/*"]
},
"target": "esnext", "target": "esnext",
"module": "commonjs", "module": "commonjs",
"outDir": "dist", "outDir": "dist",
@ -21,7 +25,7 @@
"exclude": ["./node_modules", "./public/*"], "exclude": ["./node_modules", "./public/*"],
"references": [ "references": [
{ {
"path": "./src" "path": "./src,"
}, },
{ {
"path": "./client" "path": "./client"

5
tsconfig.json Normal file
View file

@ -0,0 +1,5 @@
{
"extends": "./tsconfig.base.json",
"files": ["./webpack.config.ts"],
"references": [{"path": "./src/"}, {"path": "./client/"}]
}

View file

@ -100,11 +100,11 @@ const config: webpack.Configuration = {
extensions: [".js", ".vue", ".json", ".ts"], extensions: [".js", ".vue", ".json", ".ts"],
// modules: ["node_modules", path.resolve(__dirname, "client")], // modules: ["node_modules", path.resolve(__dirname, "client")],
plugins: [ plugins: [
new TsconfigPathsPlugin({ // new TsconfigPathsPlugin({
configFile: path.resolve(__dirname, "client/tsconfig.json"), // configFile: path.resolve(__dirname, "client/tsconfig.json"),
extensions: [".js", ".vue", ".json", ".ts"], // extensions: [".js", ".vue", ".json", ".ts"],
baseUrl: path.resolve(__dirname, "client"), // baseUrl: path.resolve(__dirname, "client"),
}), // }),
], ],
}, },
externals: { externals: {