File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import fs from 'fs' ;
2- import upath from 'path ' ;
2+ import upath from 'upath ' ;
33import Paper from '@bigcommerce/stencil-paper' ;
44
55class StencilContextAnalyzer {
@@ -322,9 +322,12 @@ class StencilContextAnalyzer {
322322
323323 this . variableUsage [ variablePath ] . count += 1 ;
324324
325+ // Normalize path to Unix-style (forward slashes) for cross-platform consistency
326+ const normalizedPath = upath . toUnix ( templatePath ) ;
327+
325328 // Only add path if it's not already in the array
326- if ( ! this . variableUsage [ variablePath ] . paths . includes ( templatePath ) ) {
327- this . variableUsage [ variablePath ] . paths . push ( templatePath ) ;
329+ if ( ! this . variableUsage [ variablePath ] . paths . includes ( normalizedPath ) ) {
330+ this . variableUsage [ variablePath ] . paths . push ( normalizedPath ) ;
328331 }
329332 }
330333
You can’t perform that action at this time.
0 commit comments