Skip to content

Commit

Permalink
优化代码,引入.scss正常,但存在 .sass文件引入问题,未解决
Browse files Browse the repository at this point in the history
  • Loading branch information
vendy committed Apr 23, 2018
1 parent 9ed32df commit a73f22b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 deletions.
14 changes: 4 additions & 10 deletions dev/build/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,11 @@ exports.cssLoaders = function(options) {
options = options || {}

const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
// const styleLoader = {
// loader: 'style-loader',
// options: {
// sourceMap: options.sourceMap
// }
// }
}

const postcssLoader = {
loader: 'postcss-loader',
Expand Down
1 change: 0 additions & 1 deletion dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"sass-loader": "^7.0.1",
"semver": "^5.5.0",
"shelljs": "^0.8.1",
"style-loader": "^0.20.3",
"uglifyjs-webpack-plugin": "^1.2.4",
"url-loader": "^1.0.1",
"vue": "^2.5.16",
Expand Down
4 changes: 4 additions & 0 deletions dev/src/view/vue/test.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
p{
font-size:22px;
color: #000;
}
5 changes: 5 additions & 0 deletions dev/src/view/vue/test.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
</div>
</template>
<script>
require('./test.scss')
export default {
name: "test",
data() {
Expand All @@ -18,3 +19,7 @@ export default {
}
};
</script>
<style lang="scss" scoped>
</style>

7 changes: 0 additions & 7 deletions dev/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6354,13 +6354,6 @@ strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"

style-loader@^0.20.3:
version "0.20.3"
resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.20.3.tgz#ebef06b89dec491bcb1fdb3452e913a6fd1c10c4"
dependencies:
loader-utils "^1.1.0"
schema-utils "^0.4.5"

supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
Expand Down

0 comments on commit a73f22b

Please sign in to comment.