<style lang="sass"></style>
import './sub.sass';
module.exports = function(){
var oBox =document.createElement('p')
oBox.className = 'p2'
oBox.innerHTML = 'form greet2'
return oBox
}
You can import, but you cannot write in js files
<style lang="sass">
</style>
The
<style>
tag is an HTML tag, and of course it cannot be written in a JS file. Import is the new syntax of Javascript ES6, so it can be used directly.You can write it, for example in the vue component template, but if you write it this way, you need a corresponding loader to compile, load and recognize your special js file.