Skip to content
This repository was archived by the owner on Dec 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion babel.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
}
],
"@babel/typescript",
"@babel/preset-react"
"@babel/react"
]
}
120 changes: 71 additions & 49 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/app.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import React from "react";

const App = () => <p>Hallo, hier ist alles schön :)</p>;

export default App;
8 changes: 8 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import "core-js/stable";
import "regenerator-runtime/runtime";

import React from "react";
import ReactDOM from "react-dom";
import App from "./app";

ReactDOM.render(<App />, document.getElementById("root"));
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"compilerOptions": {
"jsx": "react"
},
"compiler": {
"jsx": "react",
"noImplicitAny": false,
Expand Down
24 changes: 12 additions & 12 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
const path = require('path');
const path = require("path");

const HtmlWebpackPlugin = require('html-webpack-plugin');
const HtmlWebpackPlugin = require("html-webpack-plugin");

const getPath = (file) => {
return path.resolve(__dirname, 'src', file);
return path.resolve(__dirname, "src", file);
};

module.exports = () => {
return {
target: 'web',
devtool: 'eval-source-map',
entry: getPath('index.jsx'),
target: "web",
devtool: "eval-source-map",
entry: getPath("index.tsx"),
resolve: {
extensions: ['.js', '.jsx'],
extensions: [".js", ".ts", ".tsx"],
},
module: {
rules: [
{
test: /\.jsx?/,
test: /\.tsx?/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
loader: "babel-loader",
},
{
loader: 'eslint-loader',
loader: "eslint-loader",
},
],
},
],
},
plugins: [
new HtmlWebpackPlugin({
filename: 'index.html',
template: getPath('index.html'),
filename: "index.html",
template: getPath("index.html"),
}),
],
devServer: {
Expand Down