@@ -2107,7 +2107,7 @@ console.log(styles);
2107
2107
` ;
2108
2108
2109
2109
exports [` extract absolute-path-fail 1` ] = `
2110
- "Extraction path must be relative to the output directory,
2110
+ "[plugin styles] Extraction path must be relative to the output directory,
2111
2111
which is __tests__/fixtures/dist/extract/absolute-path-fail"
2112
2112
` ;
2113
2113
@@ -2293,7 +2293,7 @@ console.log(css, css$1);
2293
2293
` ;
2294
2294
2295
2295
exports [` extract relative-path-fail 1` ] = `
2296
- "Extraction path must be nested inside output directory,
2296
+ "[plugin styles] Extraction path must be nested inside output directory,
2297
2297
which is __tests__/fixtures/dist/extract/relative-path-fail"
2298
2298
` ;
2299
2299
@@ -3403,7 +3403,7 @@ exports[`modules extract: css 1`] = `
3403
3403
` ;
3404
3404
3405
3405
exports [` modules extract: js 1` ] = `
3406
- "var modules_5a199c00 = { " primary " : " #BF4040 " , " secondary " : " #1F4F7F " , " module" :" style_module" , " module2 " : " style_module2 composed_composition composition2_compositioned " } ;
3406
+ "var modules_5a199c00 = { " module" :" style_module" } ;
3407
3407
3408
3408
var modules_354770d7 = { " compositioned" :" composition2_compositioned" } ;
3409
3409
@@ -3438,7 +3438,7 @@ exports[`modules extract-sourcemap-inline: css 1`] = `
3438
3438
` ;
3439
3439
3440
3440
exports [` modules extract-sourcemap-inline: js 1` ] = `
3441
- "var modules_5a199c00 = { " primary " : " #BF4040 " , " secondary " : " #1F4F7F " , " module" :" style_module" , " module2 " : " style_module2 composed_composition composition2_compositioned " } ;
3441
+ "var modules_5a199c00 = { " module" :" style_module" } ;
3442
3442
3443
3443
var modules_354770d7 = { " compositioned" :" composition2_compositioned" } ;
3444
3444
@@ -3473,7 +3473,7 @@ exports[`modules extract-sourcemap-true: css 1`] = `
3473
3473
` ;
3474
3474
3475
3475
exports [` modules extract-sourcemap-true: js 1` ] = `
3476
- "var modules_5a199c00 = { " primary " : " #BF4040 " , " secondary " : " #1F4F7F " , " module" :" style_module" , " module2 " : " style_module2 composed_composition composition2_compositioned " } ;
3476
+ "var modules_5a199c00 = { " module" :" style_module" } ;
3477
3477
3478
3478
var modules_354770d7 = { " compositioned" :" composition2_compositioned" } ;
3479
3479
@@ -3644,7 +3644,7 @@ function injector_d9f9689a (css, options) {
3644
3644
}
3645
3645
3646
3646
var css$2 = ".style_module { \\n color : #1F4F7F ;\\n } \\ n\\ n.style_module2 { \\n } \\ n";
3647
- var modules_5a199c00 = { " primary " : " #BF4040 " , " secondary " : " #1F4F7F " , " module" :" style_module" , " module2 " : " style_module2 composed_composition composition2_compositioned " } ;
3647
+ var modules_5a199c00 = { " module" :" style_module" } ;
3648
3648
injector_d9f9689a(css$2,{ } );
3649
3649
3650
3650
var css$1 = "@media screen and (min-width: 900px) { \\n .composed_composition {\\n background-color: aqua ;\\n }\\n } \\ n\\ n.composed_composition { \\n background - color : #BF4040 ;\\n } \\ n";
@@ -3662,7 +3662,7 @@ else console.log(modules_5a199c00.module, modules_354770d7.compositioned);
3662
3662
exports [` modules inject-fn: js 1` ] = `
3663
3663
"var css$2 = ".style_module { \\n color : #1F4F7F ;\\n } \\ n\\ n.style_module2 { \\n } \\ n";
3664
3664
console.log(css$2, true);
3665
- var modules_5a199c00 = { " primary " : " #BF4040 " , " secondary " : " #1F4F7F " , " module" :" style_module" , " module2 " : " style_module2 composed_composition composition2_compositioned " } ;
3665
+ var modules_5a199c00 = { " module" :" style_module" } ;
3666
3666
3667
3667
var css$1 = "@media screen and (min-width: 900px) { \\n .composed_composition {\\n background-color: aqua ;\\n }\\n } \\ n\\ n.composed_composition { \\n background - color : #BF4040 ;\\n } \\ n";
3668
3668
console.log(css$1, true);
@@ -3748,11 +3748,7 @@ function injector_d9f9689a (css, options) {
3748
3748
3749
3749
var css$1 = ".style_module { \\n color : #1F4F7F ;\\n } \\ n\\ n.style_module2 { \\n } \\ n";
3750
3750
var injected$1 = false;
3751
- var modules_5a199c00 = { get " primary" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "#BF4040"; },
3752
- get " secondary" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "#1F4F7F"; },
3753
- get " module" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "style_module"; },
3754
- get " module2" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "style_module2 composed_composition composition2_compositioned"; },
3755
- inject : function inject() { if (! injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } },} ;
3751
+ var modules_5a199c00 = { get " module" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "style_module"; }} ;
3756
3752
3757
3753
var css = ".composition2_compositioned { \\n width : 30 % ;\\n } \\ n";
3758
3754
var injected = false;
@@ -3836,11 +3832,7 @@ function injector_d9f9689a (css, options) {
3836
3832
3837
3833
var css$1 = ".style_module { \\n color : #1F4F7F ;\\n } \\ n\\ n.style_module2 { \\n } \\ n";
3838
3834
var injected$1 = false;
3839
- var modules_5a199c00 = { get " primary" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "#BF4040"; },
3840
- get " secondary" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "#1F4F7F"; },
3841
- get " module" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "style_module"; },
3842
- get " module2" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "style_module2 composed_composition composition2_compositioned"; },
3843
- inject : function inject() { if (! injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } },} ;
3835
+ var modules_5a199c00 = { get " module" () { if (!injected$1 ) { injected$1 = true ; injector_d9f9689a (css$1 ,{}); } return "style_module"; }} ;
3844
3836
3845
3837
var css = ".composition2_compositioned { \\n width : 30 % ;\\n } \\ n";
3846
3838
var injected = false;
@@ -4571,81 +4563,6 @@ injector_f31f2858(css,{});
4571
4563
"
4572
4564
` ;
4573
4565
4574
- exports [` sass importer-node: js 1` ] = `
4575
- "/** @type { HTMLElement []} */
4576
- var containers = [];
4577
- /** @type { {prepend:HTMLStyleElement ,append:HTMLStyleElement }[]} */
4578
- var styleTags = [];
4579
-
4580
- /**
4581
- * @param { string } css
4582
- * @param { object } options
4583
- * @param { boolean } [options.prepend]
4584
- * @param { boolean } [options.singleTag]
4585
- * @param { string } [options.container]
4586
- * @param { Record < string ,string > } [options.attributes]
4587
- * @returns { void }
4588
- */
4589
- function injector_f31f2858 (css, options) {
4590
- if (! css || typeof document === " undefined" ) return ;
4591
-
4592
- var position = options .prepend === true ? " prepend" : " append" ;
4593
- var singleTag = options .singleTag === true ;
4594
-
4595
- var container =
4596
- typeof options .container === " string"
4597
- ? document .querySelector (options .container )
4598
- : document .getElementsByTagName (" head" )[0 ];
4599
-
4600
- function createStyleTag() {
4601
- var styleTag = document .createElement (" style" );
4602
- styleTag .setAttribute (" type" , " text/css" );
4603
- if (options .attributes ) {
4604
- var k = Object .keys (options .attributes );
4605
- for (var i = 0 ; i < k .length ; i ++ ) {
4606
- styleTag .setAttribute (k [i ], options .attributes [k [i ]]);
4607
- }
4608
- }
4609
- var pos = position === " prepend" ? " afterbegin" : " beforeend" ;
4610
- container .insertAdjacentElement (pos , styleTag );
4611
- return styleTag ;
4612
- }
4613
-
4614
- /** @type {HTMLStyleElement} */
4615
- var styleTag ;
4616
-
4617
- if (singleTag ) {
4618
- var id = containers.indexOf(container );
4619
-
4620
- if (id === -1) {
4621
- id = containers .push (container ) - 1 ;
4622
- styleTags [id ] = {};
4623
- }
4624
-
4625
- if (styleTags [id ] && styleTags [id ][position ]) {
4626
- styleTag = styleTags [id ][position ];
4627
- } else {
4628
- styleTag = styleTags[id][position] = createStyleTag();
4629
- }
4630
- } else {
4631
- styleTag = createStyleTag ();
4632
- }
4633
-
4634
- // strip potential UTF-8 BOM if css was read from a file
4635
- if (css.charCodeAt(0) === 0xfeff) css = css.substring(1);
4636
-
4637
- if (styleTag.styleSheet) {
4638
- styleTag .styleSheet .cssText += css ;
4639
- } else {
4640
- styleTag .appendChild (document .createTextNode (css ));
4641
- }
4642
- }
4643
-
4644
- var css = ".virtual { \\n color : red ; } \\ n\\ n.modularvirtual { \\n color : blue ; } \\ n";
4645
- injector_f31f2858(css,{ } );
4646
- "
4647
- ` ;
4648
-
4649
4566
exports [` sass importer-sync: js 1` ] = `
4650
4567
"/** @type { HTMLElement []} */
4651
4568
var containers = [];
@@ -4721,81 +4638,6 @@ injector_f31f2858(css,{});
4721
4638
"
4722
4639
` ;
4723
4640
4724
- exports [` sass importer-sync-node: js 1` ] = `
4725
- "/** @type { HTMLElement []} */
4726
- var containers = [];
4727
- /** @type { {prepend:HTMLStyleElement ,append:HTMLStyleElement }[]} */
4728
- var styleTags = [];
4729
-
4730
- /**
4731
- * @param { string } css
4732
- * @param { object } options
4733
- * @param { boolean } [options.prepend]
4734
- * @param { boolean } [options.singleTag]
4735
- * @param { string } [options.container]
4736
- * @param { Record < string ,string > } [options.attributes]
4737
- * @returns { void }
4738
- */
4739
- function injector_f31f2858 (css, options) {
4740
- if (! css || typeof document === " undefined" ) return ;
4741
-
4742
- var position = options .prepend === true ? " prepend" : " append" ;
4743
- var singleTag = options .singleTag === true ;
4744
-
4745
- var container =
4746
- typeof options .container === " string"
4747
- ? document .querySelector (options .container )
4748
- : document .getElementsByTagName (" head" )[0 ];
4749
-
4750
- function createStyleTag() {
4751
- var styleTag = document .createElement (" style" );
4752
- styleTag .setAttribute (" type" , " text/css" );
4753
- if (options .attributes ) {
4754
- var k = Object .keys (options .attributes );
4755
- for (var i = 0 ; i < k .length ; i ++ ) {
4756
- styleTag .setAttribute (k [i ], options .attributes [k [i ]]);
4757
- }
4758
- }
4759
- var pos = position === " prepend" ? " afterbegin" : " beforeend" ;
4760
- container .insertAdjacentElement (pos , styleTag );
4761
- return styleTag ;
4762
- }
4763
-
4764
- /** @type {HTMLStyleElement} */
4765
- var styleTag ;
4766
-
4767
- if (singleTag ) {
4768
- var id = containers.indexOf(container );
4769
-
4770
- if (id === -1) {
4771
- id = containers .push (container ) - 1 ;
4772
- styleTags [id ] = {};
4773
- }
4774
-
4775
- if (styleTags [id ] && styleTags [id ][position ]) {
4776
- styleTag = styleTags [id ][position ];
4777
- } else {
4778
- styleTag = styleTags[id][position] = createStyleTag();
4779
- }
4780
- } else {
4781
- styleTag = createStyleTag ();
4782
- }
4783
-
4784
- // strip potential UTF-8 BOM if css was read from a file
4785
- if (css.charCodeAt(0) === 0xfeff) css = css.substring(1);
4786
-
4787
- if (styleTag.styleSheet) {
4788
- styleTag .styleSheet .cssText += css ;
4789
- } else {
4790
- styleTag .appendChild (document .createTextNode (css ));
4791
- }
4792
- }
4793
-
4794
- var css = ".virtual { \\n color : red ; } \\ n\\ n.modularvirtual { \\n color : blue ; } \\ n";
4795
- injector_f31f2858(css,{ } );
4796
- "
4797
- ` ;
4798
-
4799
4641
exports [` sass modules: js 1` ] = `
4800
4642
"/** @type { HTMLElement []} */
4801
4643
var containers = [];
0 commit comments