File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -735,7 +735,12 @@ function transformCss(ast: any, { env }: TransformerContext) {
735
735
// based on postcss-value parser.
736
736
try {
737
737
let parser = base . parsers . css
738
- let root = parser . parse ( `@import ${ params } ;` , env . options )
738
+
739
+ let root = parser . parse ( `@import ${ params } ;` , {
740
+ // We can't pass env.options directly because css.parse overwrites
741
+ // options.originalText which is used during the printing phase
742
+ ...env . options ,
743
+ } )
739
744
740
745
return root . nodes [ 0 ] . params
741
746
} catch ( err ) {
Original file line number Diff line number Diff line change @@ -46,7 +46,20 @@ let css: TestEntry[] = [
46
46
[ `@config "./file.js";` , `@config './file.js';` ] ,
47
47
[ `@source "./file.js";` , `@source './file.js';` ] ,
48
48
[ `@source not "./file.js";` , `@source not './file.js';` ] ,
49
- [ `@source inline("./file.js");` , `@source inline('./file.js');` ] ,
49
+ [ `@source inline("flex");` , `@source inline('flex');` ] ,
50
+
51
+ [
52
+ `@import "tailwindcss";\n\n@import "./theme.css";\n\n@source "./file.js";\n\n.foo {\n color: red;\n}` ,
53
+ `@import 'tailwindcss';\n\n@import './theme.css';\n\n@source './file.js';\n\n.foo {\n color: red;\n}` ,
54
+ ] ,
55
+ [
56
+ `@import "tailwindcss";\n\n@import "./theme.css";\n\n@plugin "./file.js";\n\n.foo {\n color: red;\n}` ,
57
+ `@import 'tailwindcss';\n\n@import './theme.css';\n\n@plugin './file.js';\n\n.foo {\n color: red;\n}` ,
58
+ ] ,
59
+ [
60
+ `@import "tailwindcss";\n\n@import "./theme.css";\n\n@config "./file.js";\n\n.foo {\n color: red;\n}` ,
61
+ `@import 'tailwindcss';\n\n@import './theme.css';\n\n@config './file.js';\n\n.foo {\n color: red;\n}` ,
62
+ ] ,
50
63
]
51
64
52
65
export let javascript : TestEntry [ ] = [
You can’t perform that action at this time.
0 commit comments