diff --git a/.changeset/slow-plums-bake.md b/.changeset/slow-plums-bake.md index e43136d1..d2c64e13 100644 --- a/.changeset/slow-plums-bake.md +++ b/.changeset/slow-plums-bake.md @@ -2,4 +2,4 @@ 'playroom': patch --- -Restrict VanillaExtract plugin to playroom's source `.css.ts` files only +Restrict `playroom`'s Vanilla Extract plugin to only process playroom's `.css.ts` files diff --git a/lib/makeWebpackConfig.js b/lib/makeWebpackConfig.js index 5856217f..05a5fcd1 100644 --- a/lib/makeWebpackConfig.js +++ b/lib/makeWebpackConfig.js @@ -185,7 +185,9 @@ module.exports = async (playroomConfig, options) => { // Only apply VanillaExtract plugin to playroom's source `.css.ts` files return ( /\.css\.ts$/i.test(filePath) && - includePaths.some((playRoomPath) => filePath.includes(playRoomPath)) + includePaths.some((playroomPath) => + filePath.startsWith(playroomPath) + ) ); }, }),