Vue.js 2 has caught my interest, especially with the single-file component structure:
<template>
<h1>Hello World</h1>
</template>
<script>
export default {
name: 'hello-world',
};
</script>
<style scoped lang="scss">
h1 {
font-size: 72px;
}
</style>
I'm wondering if there's a standard method for passing variables between SCSS and JS. There's a shared value that I'm currently duplicating in both parts.
This project was created using the Vue CLI, bundled with Webpack 2 and vue-loader. I’m eager to learn if there’s a way to configure it to transfer variables between JS and SCSS seamlessly.