Skip to content

Commit 32b90c8

Browse files
docs(configuration): Clarify use of paths in Condition (#5302)
* Clarify use of paths in Condition Due to path.resolve not adding a trailing slash automatically, building a Condition using it might apply to more than the user expects. Modified the example slightly and added some comments to it. * Break comments to better fit page layout * Use path.join instead of path.resolve Co-authored-by: Nitin Kumar <snitin315@gmail.com> Co-authored-by: Nitin Kumar <snitin315@gmail.com>
1 parent 2402ab4 commit 32b90c8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/content/configuration/module.mdx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,8 +1018,11 @@ module.exports = {
10181018
{
10191019
test: /\\.css$/,
10201020
include: [
1021+
// will include any paths relative to the current directory starting with `app/styles`
1022+
// e.g. `app/styles.css`, `app/styles/styles.css`, `app/stylesheet.css`
10211023
path.resolve(__dirname, 'app/styles'),
1022-
path.resolve(__dirname, 'vendor/styles'),
1024+
// add an extra slash to only include the content of the directory `vendor/styles/`
1025+
path.join(__dirname, 'vendor/styles/'),
10231026
],
10241027
},
10251028
],

0 commit comments

Comments
 (0)