Jelajahi Sumber

grafana/toolkit: support windows paths (#18306)

Ryan McKinley 6 tahun lalu
induk
melakukan
294eabda5b

+ 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('.'));