Comments (8)
wel... more than one year later and I ran into this again. The docs really needs to updated.
from vue-loader.
You should add
vue: {
loaders: {
sass: "vue-style-loader!css-loader!sass?indentedSyntax"
}
}
into your webpack.config.js
's module.exports
section to make indentation sass syntax work (note that scss will not).
from vue-loader.
This works:
<style lang="sass?indentedSyntax">
body
margin: 0
</style>
from vue-loader.
I tried to add some code in loader(part, lang)
function loader(part, lang) {
if (lang === 'sass') {lang = 'sass?indentedSyntax'}
if (lang === 'scss') {lang = 'sass'}
lang = lang || defaultLang[part];
var loader = loaders[lang] !== undefined ? loaders[lang] : loaderPrefix[part] + lang;
return loader ? loader + '!' : '';
}
but
<style lang="sass">
body
margin: 0
</style>
still not work
from vue-loader.
Or alternatively in the webpack config file:
test: /\.vue$/, loader: vue.withLoaders({
sass: "style!css!sass?indentedSyntax"
})
from vue-loader.
Thx
from vue-loader.
Can the docs be updated on the main site if it only works with the added indentedSyntax
lang?
from vue-loader.
+1
Need to be add to the documentation.
from vue-loader.
Related Issues (20)
- Bug Report: Issue with Webpack, Vue 3, and JSX HOT 1
- vue-loader v15版本打包时在::v-deep { ... } 中写多行注释时webpack5编译时会报 Module build failed (from . /node modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js):; TypeError: Cannot read properties of undefined (reading 'spaces") at /users/xxx/xxx/example.scss:15:1错误
- Build fails if ../.config/postcssrc is not readable HOT 1
- Can't import interface / type and use them with defineProps "failed to resolve import source" HOT 2
- Hash generated(for HMR) from relative path name is not unique in a microfrontend architecture
- d
- webpack5.0+vue2.0 使用vue-loader 15.10.0 打包 vue 文件---想兼容es5 HOT 1
- Compiling RuleSet failed: Unexpected property test in condition HOT 1
- vue cli3 在打包到时候会把项目中没有使用的图片文件打包输出到dist目录。 HOT 1
- 同一页面有两个不同scopeid HOT 3
- 使用swc-loader替换babel报错 HOT 1
- Build error: Cannot read properties of null (reading 'lang') HOT 2
- v17.3 breaks v-bind HOT 2
- vue2 Upgrade vue3 vue-loader browser error message: Uncaught TypeError: Object(...) is not a function
- Error: Codegen node is missing for element/if/for node. HOT 1
- TypeError: Cannot read property 'compilation' of undefined HOT 1
- Scoped styles are not applied when loading Vue component via SystemJS
- Tricky Src Imports : no compile or hot-reload with version 17.4.2
- Importing plain component file from separate monorepo package results in wrong build
- const/let converto var
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-loader.