Fix webpack building

This commit is contained in:
Max Leiter 2022-05-03 21:09:46 -07:00
parent 5e0cbe5108
commit bed7cc04f5
No known key found for this signature in database
GPG key ID: A3512F2F2F17EBDA
7 changed files with 12 additions and 12 deletions

View file

@ -1,8 +1,8 @@
module.exports = {
presets: [
["@babel/preset-env", {bugfixes: true}],
"@babel/preset-typescript",
"@vue/babel-preset-jsx",
"babel-preset-typescript-vue",
// "@vue/babel-preset-jsx",
],
targets: "> 0.25%, not dead",
// plugins: [["@babel/transform-typescript", {allowNamespaces: true}]],

View file

@ -17,12 +17,12 @@
</template>
<script lang="ts">
import constants from "@/js/constants";
import eventbus from "@/js/eventbus";
import constants from "../js/constants";
import eventbus from "../js/eventbus";
import Mousetrap from "mousetrap";
import throttle from "lodash/throttle";
import storage from "@/js/localStorage";
import isIgnoredKeybind from "@/js/helpers/isIgnoredKeybind";
import storage from "../js/localStorage";
import isIgnoredKeybind from "../js/helpers/isIgnoredKeybind";
import Sidebar from "./Sidebar.vue";
import ImageViewer from "./ImageViewer.vue";

View file

@ -43,7 +43,7 @@ import {
generateUserContextMenu,
generateChannelContextMenu,
generateInlineChannelContextMenu,
} from "../js/helpers/contextMenu.js";
} from "../js/helpers/contextMenu";
import eventbus from "../js/eventbus";
export default {

View file

@ -8,6 +8,9 @@
"../package.json"
],
"compilerOptions": {
// "paths": {
// "@js/*": ["js/*"]
// },
// https://v2.vuejs.org/v2/guide/typescript.html?redirect=true#Recommended-Configuration
"target": "ES5",
"strict": true,

View file

@ -1,7 +1,4 @@
{
"extends": "./tsconfig.base.json",
"include": ["src/**/*.ts", "client/**/*.ts", "test/**/*.ts", "scripts/**/*.{ts,js}"]
// "compilerOptions": {
// "types": ["node", "jest"]
// }
}

View file

@ -20,7 +20,7 @@
"lint:eslint": "eslint . --ext .js,.vue --report-unused-disable-directives --color",
"lint:prettier": "prettier --list-different \"**/*.*\"",
"lint:stylelint": "stylelint --color \"client/**/*.css\"",
"start": "node index start",
"start": "ts-node index start",
"test": "run-p --aggregate-output --continue-on-error lint:* test:*",
"test:mocha": "webpack --mode=development && nyc --nycrc-path=test/.nycrc-mocha.json mocha --colors --config=test/.mocharc.yml",
"watch": "webpack --watch"

View file

@ -43,7 +43,7 @@ const config: webpack.Configuration = {
},
},
{
test: /\.ts$/,
test: /\.js$|\.ts$/,
include: [path.resolve(__dirname, "client")],
exclude: path.resolve(__dirname, "node_modules"),
use: {