{
"compilerOptions": {
"target": "esnext",
"lib": [
"DOM",
"ES2021.String"
],
"allowJs": true,
"skipLibCheck": true,
"allowSyntheticDefaultImports": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"noEmit": true,
"jsx": "react-jsx",
"sourceMap": true,
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"strictFunctionTypes:": false,
"baseUrl": "./js"
},
"include": ["resources/js"]
}
require('dotenv').config();
const path = require('path');
const mix = require('laravel-mix');
const tailwindcss = require("tailwindcss");
mix.ts('resources/js/main/index.tsx', 'public/js/main')
.react()
.postCss("resources/css/app.css", "public/css", [
tailwindcss,
]);
mix.webpackConfig({
output: {
publicPath: "/",
},
resolve: {
extensions: ['.ts', '.tsx', '.js'],
alias: {
'external': path.join(__dirname, 'resources/js/external')
},
},
module: {
rules: [{
test: /\.tsx?$/,
loader: "babel-loader",
exclude: /node_modules/,
options: {
presets: ["@babel/preset-react", "@babel/preset-typescript"],
},
},],
},
});