Skip to content

Commit 44fffef

Browse files
committed
🎉 Init typescript
1 parent e2ca077 commit 44fffef

File tree

5 files changed

+28
-1
lines changed

5 files changed

+28
-1
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Node
2+
node_modules
3+
4+
# IDEA
5+
.idea

index.ts

Whitespace-only changes.

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
"bugs": {
2020
"url": "https://github.com/SettingDust/webpack-tampermonkey/issues"
2121
},
22+
"prettier": {
23+
"semi": false,
24+
"singleQuote": true,
25+
"printWidth": 150
26+
},
2227
"homepage": "https://github.com/SettingDust/webpack-tampermonkey#readme",
2328
"devDependencies": {
2429
"@types/node": "^14.0.13",

tsconfig.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"outDir": "./dist/",
4+
"module": "es6",
5+
"target": "es5",
6+
"sourceMap": true
7+
}
8+
}

webpack.config.ts

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
import { Configuration } from 'webpack';
22

33
export default {
4-
4+
entry: 'index.ts',
5+
module: {
6+
rules: [
7+
{
8+
test: /\.tsx?$/,
9+
use: 'ts-loader',
10+
exclude: /node_modules/
11+
}
12+
]
13+
}
514
} as Configuration;

0 commit comments

Comments
 (0)