Skip to content

Commit

Permalink
fix bundle path under win32
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Hiller <boneskull@boneskull.com>
  • Loading branch information
boneskull committed Jul 1, 2020
1 parent b8c30ed commit 5b08dec
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/karma-rollup-plugin.js
Expand Up @@ -62,9 +62,13 @@ function framework(fileConfigs, pluginConfig, basePath, preprocessors) {
...new Set(bundlePatterns.map(pattern => glob.sync(pattern)).flat())
];

const bundleLocation = pluginConfig.bundlePath
let bundleLocation = pluginConfig.bundlePath
? pluginConfig.bundlePath
: path.resolve(os.tmpdir(), `${uuid.v4()}.rollup.js`);
if (process.platform === 'win32') {
bundleLocation = bundleLocation.replace(/\\/g, '/');
}

fs.closeSync(fs.openSync(bundleLocation, 'w'));
preprocessors[bundleLocation] = ['rollup'];

Expand Down

0 comments on commit 5b08dec

Please sign in to comment.