vuejs / vue-cli

🛠️ webpack-based tooling for Vue.js Development
https://cli.vuejs.org/
MIT License
29.75k stars 6.33k forks source link

css loader localIdentName doesn't work #1660

Closed spydevil closed 6 years ago

spydevil commented 6 years ago

Version 3.0.0-rc.3

Steps to reproduce vue.config.js

module.exports = {
    devServer: {
        host: '0.0.0.0',
        port: 3000,
    },
    css: {
        loaderOptions: {
            css: {
                localIdentName: '[name]-[hash]',
                camelCase: 'only'
            }
        }
    }
};

package.json

{
    "name": "tetris",
    "version": "0.1.0",
    "private": true,
    "scripts": {
        "serve": "vue-cli-service serve --open",
        "build": "vue-cli-service build",
        "lint": "vue-cli-service lint"
    },
    "dependencies": {
        "animejs": "^2.2.0",
        "axios": "^0.18.0",
        "material-design-icons-iconfont": "^3.0.3",
        "vue": "^2.5.16",
        "vue-property-decorator": "^6.1.0",
        "vue-router": "^3.0.1",
        "vue-status-indicator": "^1.1.0",
        "vuetify": "^1.0.19",
        "vuex": "^3.0.1",
        "vuex-class": "^0.3.1",
        "vuex-router-sync": "^5.0.0"
    },
    "devDependencies": {
        "@types/animejs": "^2.0.0",
        "@types/jest": "^22.0.1",
        "@vue/cli-plugin-babel": "^3.0.0-beta.6",
        "@vue/cli-plugin-eslint": "^3.0.0-beta.15",
        "@vue/cli-plugin-typescript": "^3.0.0-beta.15",
        "@vue/cli-service": "^3.0.0-beta.15",
        "@vue/eslint-config-airbnb": "^3.0.0-rc.3",
        "@vue/eslint-config-prettier": "^3.0.0-beta.6",
        "@vue/eslint-config-typescript": "^3.0.0-rc.3",
        "babel-core": "^7.0.0-0",
        "babel-preset-vue": "^2.0.1",
        "node-sass": "^4.9.0",
        "sass-loader": "^7.0.1",
        "ts-jest": "^22.0.1",
        "vue-template-compiler": "^2.5.16",
    },
    "browserslist": [
        "> 1%",
        "last 2 versions",
        "not ie <= 8"
    ]
}

What is expected? Shorten and hashed css class name

What is actually happening? The css names are exactly the same

I want shortest and hashed css class names when I was build project

vue-bot commented 6 years ago

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!