When the build process (babel) quits and the transform was used it leaves a child process running which causes CI build to hang and eventually fail.
Code to reproduce:
const babel = require("babel-core");
const babelOpts = {
plugins: [
['transform-postcss', {
config: 'path/to/postcss.config.js'
}]
]
};
const source = 'const s = require("./path/to/postcss/file.css");';
const res = babel.transform(source, babelOpts);
console.log(res.code);
postcss.config.js:
module.exports = ctx => ({
plugins: []
});
CSS file:
The transpiled code is correct the only problem is orphaned child process.
After looking for details I found in MacOS's Activity Monitor that this process is using /tmp/bptp-<projectname>.sock file.
When the build process (babel) quits and the transform was used it leaves a child process running which causes CI build to hang and eventually fail.
Code to reproduce:
postcss.config.js:
CSS file:
The transpiled code is correct the only problem is orphaned child process.
After looking for details I found in MacOS's Activity Monitor that this process is using
/tmp/bptp-<projectname>.sockfile.