aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidpkj <davidpenkow1@gmail.com>2022-12-13 15:02:28 +0100
committerdavidpkj <davidpenkow1@gmail.com>2022-12-13 15:02:28 +0100
commit500508a734df23069eea44cb996ae260d178f2e0 (patch)
treeb062df963fe9b244165917715552e4afdf147b46
parentb9cb4c2b4b7323f8df8fa87023c41ce8abfff9ae (diff)
Add: TS & WP config
-rw-r--r--tsconfig.json15
-rw-r--r--webpack.config.js22
2 files changed, 37 insertions, 0 deletions
diff --git a/tsconfig.json b/tsconfig.json
new file mode 100644
index 0000000..47fd08a
--- /dev/null
+++ b/tsconfig.json
@@ -0,0 +1,15 @@
+{
+ "compilerOptions": {
+ "outDir": "./dist/",
+ "module": "es6",
+ "target": "es5",
+ "baseUrl": "./src/",
+ "typeRoots": ["./node_modules/@types"],
+ },
+ "files": [
+ "src/index.ts"
+ ],
+ "include": [
+ "src/**/*"
+ ]
+} \ No newline at end of file
diff --git a/webpack.config.js b/webpack.config.js
new file mode 100644
index 0000000..c5b488f
--- /dev/null
+++ b/webpack.config.js
@@ -0,0 +1,22 @@
+const path = require("path");
+
+module.exports = {
+ mode: "development",
+ entry: "./src/index.ts",
+ output: {
+ filename: "index.js",
+ path: path.resolve(__dirname, "dist"),
+ },
+ module: {
+ rules: [
+ {
+ test: /\.tsx?$/,
+ use: 'ts-loader',
+ exclude: /node_modules/,
+ },
+ ],
+ },
+ resolve: {
+ extensions: ['.tsx', '.ts', '.js'],
+ },
+}; \ No newline at end of file