Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
green1052 committed Jul 23, 2021
1 parent 184d42a commit 8179117
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
"@babel/runtime": "^7.14.6",
"@types/jquery": "^3.5.6",
"@types/node": "^16.4.1",
"@types/webpack": "^5.28.0",
"babel-loader": "^8.2.2",
"ts-node": "^10.1.0",
"typescript": "^4.3.5",
"webpack": "^4.46.0",
"webpack-cli": "^4.7.2",
"webpack-userscript": "^2.5.8"
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
/* Advanced Options */
"skipLibCheck": true,
/* Skip type checking of declaration files. */
"forceConsistentCasingInFileNames": true
"forceConsistentCasingInFileNames": true,
"resolveJsonModule": true
/* Disallow inconsistently-cased references to the same file. */
}
}
14 changes: 9 additions & 5 deletions webpack.config.js → webpack.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
const path = require("path");
const WebpackUserscript = require("webpack-userscript");
import path from "path";

const version = require("./package.json").version;
import WebpackUserscript from "webpack-userscript";

import {version} from "./package.json";
import webpack from "webpack";

const header = {
"name": "BetterNovelpia",
Expand All @@ -23,7 +25,7 @@ const header = {
"version": version
};

module.exports = {
const config: webpack.Configuration = {
mode: "production",
entry: "./src/index.ts",
module: {
Expand Down Expand Up @@ -66,4 +68,6 @@ module.exports = {
headers: header
})
]
};
};

export default config;

0 comments on commit 8179117

Please sign in to comment.