Files
OverlayScrollbars/config/jest-test-server.loader.js
T
2021-01-25 00:47:15 +01:00

11 lines
407 B
JavaScript

const path = require('path');
const deploymentConfig = require('./jest-browser.rollup.config.js');
module.exports = {
process: (src, filePath) => {
const deploymentPath = path.relative(deploymentConfig.root, filePath);
const split = deploymentPath.split(path.sep);
return `module.exports = ${JSON.stringify(`http://localhost:${deploymentConfig.port}/${path.posix.join(...split)}`)}`;
},
};