Add Typescript
This commit is contained in:
parent
5807df422b
commit
d7ced8c03d
|
@ -10,4 +10,15 @@ module.exports = {
|
|||
},
|
||||
],
|
||||
],
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts?$/i,
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader'
|
||||
},
|
||||
],
|
||||
exclude: /node_modules/,
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -33,6 +33,8 @@
|
|||
"eslint": "^8.3.0",
|
||||
"jest": "^27.3.1",
|
||||
"node-forge": "^1.3.0",
|
||||
"ts-loader": "^9.4.4",
|
||||
"typescript": "^5.1.6",
|
||||
"webpack": "^5.64.4",
|
||||
"webpack-cli": "^4.9.1",
|
||||
"webpack-dev-server": "^4.6.0"
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"jsx": "react",
|
||||
"jsxFactory": "h",
|
||||
"jsxFragmentFactory": "Fragment",
|
||||
"module": "esnext",
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "es6",
|
||||
"lib": ["DOM", "ES6"],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"exactOptionalPropertyTypes": true,
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"sourceMap": true,
|
||||
"strictNullChecks": true,
|
||||
"outDir": "dist",
|
||||
"baseUrl": ".",
|
||||
"allowJs": true,
|
||||
"paths": {
|
||||
"*": [
|
||||
"node_modules/*",
|
||||
"types/*"
|
||||
],
|
||||
"js/*": [
|
||||
"js/*"
|
||||
],
|
||||
"json/*": [
|
||||
"json/*"
|
||||
],
|
||||
"test/*": [
|
||||
"test/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"js/**/*",
|
||||
"test/**/*",
|
||||
"types/**/*",
|
||||
"*.config.js"
|
||||
]
|
||||
}
|
|
@ -13,6 +13,25 @@ module.exports =
|
|||
libraryExport: 'Apple1',
|
||||
libraryTarget: 'var'
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.ts$/i,
|
||||
use: [
|
||||
{
|
||||
loader: 'ts-loader'
|
||||
},
|
||||
],
|
||||
exclude: /node_modules/,
|
||||
}
|
||||
]
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.ts', '.js'],
|
||||
alias: {
|
||||
js: path.resolve(__dirname, 'js/')
|
||||
}
|
||||
},
|
||||
devServer: {
|
||||
compress: true,
|
||||
static: {
|
||||
|
|
Loading…
Reference in New Issue