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!
10.
Modular CSS
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
}
}
3 Comments
If you have problems with the name part of the css class replace the config part in webpack.config.js with
It seems like the setting moved an level higher.
found in https://vue-loader.vuejs.org/guide/css-modules.html#usage
there you can see that modules and localIdentName are on the same level
Not testet in Vue3
EDIT: And don't forget to start yarn watch again ;)
Hello,
I have a problem.
I'm trying to reproduce the work as shown but i'm facing an issue with the use of $style variable.
This is the error i'm having:
<blockquote>[Vue warn]: Property "$style" was accessed during render but is not defined on instance.
at <App>
[Vue warn]: Unhandled error during execution of render function
at <App>
Uncaught TypeError: Cannot read properties of undefined (reading 'sidebar')
</blockquote>
Here is my products.vue complete code
Hey @Kakashi!
Do the
$stylevariable becomes available IF you're using "modular" CSS. So, that's where I looked first. And I noticed you havemodule="". In the tutorial, it's just<style lang="scss" module>. My first guess would be to tweak this part: I've never used module="", so I don't know if that actually works or not (it seems like it's not working!).Cheers!
"Houston: no signs of life"
Start the conversation!