Skip to content

CSS modules #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 5, 2016
Merged

CSS modules #422

merged 6 commits into from
Nov 5, 2016

Conversation

YiSiWang
Copy link

@yyx990803
2.x uses vue-template-compiler, which doesn't expose non standard props (module) on <style> tag.

Should we use data-module instead or modify vue-template-compiler to expose non standard props?

I prefer the later cause scoped was removed from standard.

@yyx990803
Copy link
Member

I assume this depends on vuejs/vue#4091 - should be included in 2.0.4

@YiSiWang
Copy link
Author

YiSiWang commented Nov 3, 2016

Add localIdentName support.

vue: {
  cssModules: {
    localIdentName: '[path][name]---[local]---[hash:base64:5]'
  }
}

For easier debugging.

libraryTarget: 'commonjs2'
})
}, function (code) {
// http://stackoverflow.com/questions/17581830/load-node-js-module-from-string-in-memory
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's tricky here. Anyway better to test a webpack generated node module?

@YiSiWang YiSiWang force-pushed the modules branch 2 times, most recently from c552c22 to 2a0537b Compare November 4, 2016 10:15
@YiSiWang
Copy link
Author

YiSiWang commented Nov 4, 2016

@PowerfulPony
Use vue-template-compiler built from vuejs/vue@35f145c, and remove the parser hack.
All tests passed.

@yyx990803
Copy link
Member

Looking good. Pending 2.0.4 release of vue-template-compiler.

@@ -40,7 +40,7 @@
"source-map": "^0.5.6",
"vue-hot-reload-api": "^2.0.1",
"vue-style-loader": "^1.0.0",
"vue-template-compiler": "^2.0.0-rc.3",
"vue-template-compiler": "git://github.com/YiSiWang/vue-template-compiler.git#fc2ce58",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.0.4 released, we can change this now

@yyx990803 yyx990803 merged commit 75ca421 into vuejs:master Nov 5, 2016
@yyx990803
Copy link
Member

This is out in 9.8.0!

@YiSiWang YiSiWang changed the title [WIP]CSS modules CSS modules Jan 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants