Closed Rasool-deldar closed 2 years ago
me too. if my ts-loader options transpileOnly is false my tsconfig
"types": [
"unplugin-vue2-script-setup/types",
"unplugin-vue2-script-setup/ref-macros"
],
@Rasool-deldar try ts-loader options transpileOnly be true and use ForkTsCheckerWebpackPlugin to check ts in webpack config
{
loader: 'ts-loader',
options: {
transpileOnly: true,
}
}
plugins: [
new ForkTsCheckerWebpackPlugin(
{
typescript: {
extensions: {
vue: {
enabled: true,
compiler: '@vue/compiler-sfc'
}
},
diagnosticOptions: {
semantic: true,
syntactic: false
}
}
}
)
]
@Rasool-deldar try ts-loader options transpileOnly be true and use ForkTsCheckerWebpackPlugin to check ts in webpack config
{ loader: 'ts-loader', options: { transpileOnly: true, } }
plugins: [ new ForkTsCheckerWebpackPlugin( { typescript: { extensions: { vue: { enabled: true, compiler: '@vue/compiler-sfc' } }, diagnosticOptions: { semantic: true, syntactic: false } } } ) ]
Thank you for your help.
Hello, good morning, I'm sorry, I installed your package for Laravel-Mix according to the instructions, but unfortunately, the typing script gives the following error : Property 'setup' does not exist on type '{}'. node -v 16. * vue 2.6.14 typescript: 4.5.5 @ vue / composition-api -v 1.4.6 @ vue / runtime-dom -v 3.2.31 unplugin-vue2-script-setup -v 0.9.3
// laravel-mix mix.webpackConfig({ plugins: [ ScriptSetup({ }), ]});