This repository was archived by the owner on Jan 18, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Expand file tree Collapse file tree 3 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,13 @@ const config = [
1515 // Resolve packages from `node_modules` e.g. `style-inject` module
1616 // used by `rollup-plugin-postcss` to inline CSS.
1717 NodeResolve ( ) ,
18- VuePlugin ( ) ,
19- // Process only `<style module>` blocks.
20- PostCSS ( {
21- modules : {
18+ VuePlugin ( {
19+ // PostCSS-modules options for <style module> compilation
20+ cssModulesOptions : {
2221 generateScopedName : '[local]___[hash:base64:5]' ,
2322 } ,
24- include : / & m o d u l e = .* \. c s s $ / ,
2523 } ) ,
26- // Process all `<style>` blocks except `<style module>`.
27- PostCSS ( { include : / (?< ! & m o d u l e = .* ) \. c s s $ / } ) ,
24+ PostCSS ( ) ,
2825 ] ,
2926 external ( id ) {
3027 return / ^ ( v u e ) $ / . test ( id )
Original file line number Diff line number Diff line change @@ -18,6 +18,6 @@ export default {
1818
1919<style scoped>
2020.green {
21- color : red ;
21+ color : green ;
2222}
2323 </style >
Original file line number Diff line number Diff line change @@ -56,9 +56,9 @@ describe('css-modules', () => {
5656 expect ( result . output [ 0 ] . code ) . not . toEqual (
5757 expect . stringContaining ( '.red {\n color: red;\n}' )
5858 )
59- expect ( result . output [ 0 ] . code ) . toEqual ( expect . stringContaining ( '._red_ ' ) )
59+ expect ( result . output [ 0 ] . code ) . toEqual ( expect . stringContaining ( '.red___ ' ) )
6060 expect ( result . output [ 0 ] . code ) . toEqual (
61- expect . stringContaining ( '{"red":"_red_ ' )
61+ expect . stringContaining ( '{"red":"red___ ' )
6262 )
6363 } )
6464
@@ -67,7 +67,7 @@ describe('css-modules', () => {
6767 expect . stringContaining ( '.__scopeId = "data-v-' )
6868 )
6969 expect ( result . output [ 0 ] . code ) . not . toEqual (
70- expect . stringContaining ( '.green {\n color: red ;\n}' )
70+ expect . stringContaining ( '.green {\n color: green ;\n}' )
7171 )
7272 expect ( result . output [ 0 ] . code ) . toEqual (
7373 expect . stringContaining ( '.green[data-v-' )
You can’t perform that action at this time.
0 commit comments