From 0623c34491c5a7b3b9812ea65d97c9b51f7c5496 Mon Sep 17 00:00:00 2001 From: uzi <43224578+vickkie@users.noreply.github.com> Date: Sat, 6 Apr 2024 14:00:53 +0300 Subject: [PATCH] ts --- package.json | 2 -- tsconfig.json | 27 ++++++--------------------- webpack.config.js | 8 ++++++++ 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 310d2ed7..8b194ec9 100644 --- a/package.json +++ b/package.json @@ -35,8 +35,6 @@ "css-loader": "^5.0.0", "css-minimizer-webpack-plugin": "^6.0.0", "dotenv-webpack": "^8.0.1", - "html-minifier-terser": "^7.2.0", - "html-minifier-webpack-plugin": "^2.2.3", "html-minimizer-webpack-plugin": "^5.0.0", "html-webpack-plugin": "^5.0.0", "mini-css-extract-plugin": "^2.8.1", diff --git a/tsconfig.json b/tsconfig.json index d1a75b62..f573561f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,30 +1,15 @@ - { "compilerOptions": { + "outDir": "./public/", + "noImplicitAny": true, + "module": "es6", "target": "es5", - "module": "commonjs", - "strict": false, - "esModuleInterop": true, - "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "noImplicitAny": false, - "noImplicitThis": false, - "strictNullChecks": false, - "strictFunctionTypes": false, - "strictBindCallApply": false, - "strictPropertyInitialization": false, - "noImplicitReturns": false, - "noFallthroughCasesInSwitch": false, - "ignoreDeprecations": "5.0", - "noImplicitUseStrict": true, - "allowSyntheticDefaultImports": true, + "jsx": "react", "allowJs": true, - "checkJs": false, - "noEmit": true, - "noUnusedLocals": false, - "noUnusedParameters": false + "moduleResolution": "node" } } + diff --git a/webpack.config.js b/webpack.config.js index c7e0e659..4add216c 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -23,6 +23,9 @@ module.exports = { projectSlider: "./App.jsx", partnerModal: "./modal.jsx", }, + resolve: { + extensions: [".tsx", ".ts", ".jsx"], + }, output: { filename: "[name].bundle.js", // outputs {file}.bundle.js path: path.resolve(__dirname, "public"), @@ -43,6 +46,11 @@ module.exports = { }, }, }, + { + test: /\.tsx?$/, + use: "ts-loader", + exclude: /node_modules/, + }, ], }, optimization: {