Skip to content
This repository was archived by the owner on Jun 29, 2021. It is now read-only.

Commit f20c39a

Browse files
author
renl
committed
add less less-loader
1 parent d6484ef commit f20c39a

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@
1111
"@vue/compiler-sfc": "^3.0.0-beta.2",
1212
"css-loader": "^3.4.2",
1313
"file-loader": "^6.0.0",
14+
"less": "^3.12.2",
15+
"less-loader": "^7.0.0",
1416
"mini-css-extract-plugin": "^0.9.0",
17+
"style-loader": "^1.2.1",
1518
"url-loader": "^4.0.0",
1619
"vue-loader": "^16.0.0-alpha.3",
1720
"webpack": "^4.42.1",

src/App.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,12 @@ export default {
6161
}
6262
</script>
6363

64-
<style scoped>
64+
<style lang="less" scoped>
6565
.root {
6666
text-align: center;
67+
button{
68+
box-shadow: 0 0 3px #000;
69+
}
6770
}
6871
img {
6972
width: 200px;

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ module.exports = (env = {}) => ({
4141
},
4242
'css-loader'
4343
]
44+
},
45+
{
46+
test: /\.less$/,
47+
loader: 'style-loader!css-loader!less-loader'
4448
}
4549
]
4650
},

0 commit comments

Comments
 (0)