mirror of
https://github.com/xibyte/jsketcher
synced 2026-02-09 17:04:04 +01:00
enable typescript for webpack
This commit is contained in:
parent
5a56478aec
commit
248dc5b10b
5 changed files with 25 additions and 9 deletions
7
.babelrc
7
.babelrc
|
|
@ -1,7 +1,10 @@
|
|||
{
|
||||
"presets": ["@babel/env", "@babel/react", "@babel/flow"],
|
||||
"presets": ["@babel/typescript", "@babel/env", "@babel/react", "@babel/flow"],
|
||||
"plugins": [
|
||||
["@babel/plugin-proposal-decorators", { "legacy": true }],
|
||||
"@babel/proposal-class-properties"
|
||||
"@babel/proposal-class-properties",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator",
|
||||
"@babel/plugin-proposal-optional-chaining"
|
||||
|
||||
]
|
||||
}
|
||||
|
|
|
|||
5
package-lock.json
generated
5
package-lock.json
generated
|
|
@ -4082,11 +4082,6 @@
|
|||
"integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==",
|
||||
"dev": true
|
||||
},
|
||||
"diff-match-patch": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/diff-match-patch/-/diff-match-patch-1.0.0.tgz",
|
||||
"integrity": "sha1-HMPIOkkNZ/ldkeOfatHy4Ia2MEg="
|
||||
},
|
||||
"diffie-hellman": {
|
||||
"version": "5.0.3",
|
||||
"resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz",
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@
|
|||
"less": "^3.11.1",
|
||||
"libtess": "1.2.2",
|
||||
"lodash": "^4.17.15",
|
||||
"marked": "^1.0.0",
|
||||
"mousetrap": "1.6.1",
|
||||
"numeric": "1.2.6",
|
||||
"prop-types": "15.6.0",
|
||||
|
|
|
|||
17
tsconfig.json
Normal file
17
tsconfig.json
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"lib": ["es2018", "dom"],
|
||||
"sourceMap": true,
|
||||
"jsx": "react",
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "ES5",
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"modules/*",
|
||||
"node_modules/*"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ module.exports = {
|
|||
new webpack.HotModuleReplacementPlugin(),
|
||||
],
|
||||
resolve: {
|
||||
extensions: ['.js', '.jsx'],
|
||||
extensions: ['.js', '.jsx', ".ts", ".tsx"],
|
||||
modules: [MODULES, "node_modules"]
|
||||
},
|
||||
devServer: {
|
||||
|
|
@ -48,7 +48,7 @@ module.exports = {
|
|||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.(js|jsx)$/,
|
||||
test: /\.(js|jsx|ts|tsx)$/,
|
||||
loader: 'babel-loader',
|
||||
include: [MODULES, WEB_APP, INTEGRATION_TESTS]
|
||||
}, {
|
||||
|
|
|
|||
Loading…
Reference in a new issue