I've been encountering errors while trying to set up TypeScript in Laravel 5.6 and running 'npm run dev'. Below is my configuration - can someone help me identify what's wrong?
webpack.mix.js
let mix = require('laravel-mix');
mix.webpackConfig({
resolve : {
extensions : ['.ts']
},
module : {
rules : [
{
test : /\.ts$/,
loader : 'ts-loader'
}
]
}
});
mix.js('resources/assets/ts/app.ts', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"strict": true
},
"include": [
"resources/assets/ts/**/*.ts"
],
"exclude": [
"node_modules"
]
}