-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: respect
default
when loading postcss esm configs
- Loading branch information
Showing
10 changed files
with
111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
test/fixtures/config-autoload/js/array-esm-js/imports/section.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.import { | ||
color: goldenrod; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@import 'imports/section.css'; | ||
|
||
.test { | ||
color: cyan; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import style from './index.css' | ||
|
||
export default style |
21 changes: 21 additions & 0 deletions
21
test/fixtures/config-autoload/js/array-esm-js/postcss.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import postcssNested from 'postcss-nested'; | ||
export default function (api) { | ||
return { | ||
parser: 'sugarss', | ||
syntax: 'sugarss', | ||
map: api.mode === 'development' ? 'inline' : false, | ||
from: './test/fixtures/config-autoload/js/object/index.css', | ||
to: './test/fixtures/config-autoload/js/object/expect/index.css', | ||
plugins: [ | ||
'postcss-import', | ||
[ | ||
'postcss-nested', | ||
{ | ||
// Options | ||
} | ||
], | ||
postcssNested, | ||
postcssNested({ /* Options */ }), | ||
] | ||
} | ||
}; |
3 changes: 3 additions & 0 deletions
3
test/fixtures/config-autoload/js/array-mjs/imports/section.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.import { | ||
color: goldenrod; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@import 'imports/section.css'; | ||
|
||
.test { | ||
color: cyan; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import style from './index.css' | ||
|
||
export default style |
21 changes: 21 additions & 0 deletions
21
test/fixtures/config-autoload/js/array-mjs/postcss.config.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import postcssNested from 'postcss-nested'; | ||
export default function (api) { | ||
return { | ||
parser: 'sugarss', | ||
syntax: 'sugarss', | ||
map: api.mode === 'development' ? 'inline' : false, | ||
from: './test/fixtures/config-autoload/js/object/index.css', | ||
to: './test/fixtures/config-autoload/js/object/expect/index.css', | ||
plugins: [ | ||
'postcss-import', | ||
[ | ||
'postcss-nested', | ||
{ | ||
// Options | ||
} | ||
], | ||
postcssNested, | ||
postcssNested({ /* Options */ }), | ||
] | ||
} | ||
}; |