I have a problem and I am a bit desperate as I could not find a solution yet (also because I don't know what to google).
So I have an existing (still almost new) Laravel project and wanted to upgrade from vue2 to vue3 with typescript. So with this tutorial I switched from vue2 to vue3 and with this tutorial, I switched to typescript. When serving the project (php artisan serve) I get an "404 Not Found" error for http://127.0.0.1:8000/js/app.ts. There are also two warning that the with the source "http://127.0.0.1:8000/js/app.ts" and "http://localhost:35729/livereload.js" could not be loaded
Here are some files I changed
// webpack.mix.js
const LiveReloadPlugin = require('webpack-livereload-plugin');
mix.ts('resources/js/app.ts', 'public/js')
.vue();
mix.webpackConfig({
plugins: [new LiveReloadPlugin()]
})
// tsconfig.json
{
"compilerOptions": {
"target": "es5",
"strict": true,
"module": "es2015",
"moduleResolution": "node",
},
"include": [
"resources/js/**/*"
]
}
// resources/js/app.ts
import { createApp } from 'vue';
import App from './components/App.vue'
createApp(App)
.mount('#app');
// resources/shims-vue.d.ts
declare module "*.vue" {
import { ComponentOptions } from "vue";
const component: ComponentOptions;
export default component;
}
Does anyone knows how to fix this? I really appreciate any kind of suggestions.