Quellcode durchsuchen

grafana/toolkit: support windows paths (#18306)

Ryan McKinley vor 6 Jahren
Ursprung
Commit
294eabda5b
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      packages/grafana-toolkit/src/config/webpack.plugin.config.ts

+ 1 - 1
packages/grafana-toolkit/src/config/webpack.plugin.config.ts

@@ -42,7 +42,7 @@ const getModuleFiles = () => {
 
 const getManualChunk = (id: string) => {
   if (id.endsWith('module.ts') || id.endsWith('module.tsx')) {
-    const idx = id.indexOf('/src/');
+    const idx = id.indexOf(path.sep + 'src' + path.sep);
     if (idx > 0) {
       const name = id.substring(idx + 5, id.lastIndexOf('.'));