Chapters
48 Chapters
|
5:05:52
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!
Subscribe to download the code!
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Subtitles
Subscribe to download the subtitles!
Subscribe to download the subtitles!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
14.
Aliases
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
This course is also built to work with Vue 3!
What JavaScript libraries does this tutorial use?
// package.json
{
"devDependencies": {
"@symfony/webpack-encore": "^0.30.0", // 0.30.2
"axios": "^0.19.2", // 0.19.2
"bootstrap": "^4.4.1", // 4.5.0
"core-js": "^3.0.0", // 3.6.5
"eslint": "^6.7.2", // 6.8.0
"eslint-config-airbnb-base": "^14.0.0", // 14.1.0
"eslint-plugin-import": "^2.19.1", // 2.20.2
"eslint-plugin-vue": "^6.0.1", // 6.2.2
"regenerator-runtime": "^0.13.2", // 0.13.5
"sass": "^1.29.0", // 1.29.0
"sass-loader": "^8.0.0", // 8.0.2
"vue": "^2.6.11", // 2.6.11
"vue-loader": "^15.9.1", // 15.9.2
"vue-template-compiler": "^2.6.11", // 2.6.11
"webpack-notifier": "^1.6.0" // 1.8.0
}
}
9 Comments
Hi,
when i look the tutorial video I saw that on your Phpstorm you haven't got error on aliases, how you inform to Phpstorm that the aliases are not errors ? this is a special plugin you have ?
I found the solution was on webpack config :D https://prnt.sc/1whxll8
Hey Lionel,
I'm really happy you found the solution! And thanks for sharing that if you set "Detect webpack configuration files for module resolution" option to "Automatically" in "Languages & Frameworks" -> "JavaScript" -> "Webpack" of PhpStorm's config helps :)
Cheers!
Hi, thanks for this tutorial. How do I make this work with TypeScript? I tried it with:
`
"baseUrl": "./",
"paths": {
},
`
in my tsconfig.json, but it doesn't seem to work :(
Hey Gustavo!
When it comes to Vue 2, TypeScript is not recommended. There are issues with the Options API (the way we declare our components) and the magic "this" keyword that TypeScript is unable to type-check correctly.
However, if you still want to pursue TypeScript with this project, it seems like you would need to add TypeScript to Webpack Encore first, then configure the application's entry files to be processed correctly.
Here's some documentation: https://symfony.com/doc/current/frontend/encore/typescript.html
thanks for your answer, I'm already using Vue 3 and TypeScript on Encore, specifically these versions:
<br />"@vue/compiler-sfc": "^3.0.0-rc.4",<br />"ts-loader": "^5.3.0",<br />"typescript": "^3.9.7",<br />"vue": "^3.0.0-rc.4",<br />"vue-loader": "^16.0.0-beta.4",<br />and i was relying on this page...
https://v3.vuejs.org/guide/typescript-support.htm
No problem!
Could you share more details on your issue? What errors do you see? Does it generate the JavaScript files?
Finally, I found the problem, the correct setting in tsconfig.json is:
`
"baseUrl": "./assets",
"paths": {
}
`
Thanks you!
Glad you found it!
"Houston: no signs of life"
Start the conversation!