grafana/toolkit: support windows paths (#18306)

This commit is contained in:
Ryan McKinley 2019-07-30 10:48:21 -07:00 committed by GitHub
parent 7891233812
commit 294eabda5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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