mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
17 lines
534 B
JavaScript
17 lines
534 B
JavaScript
const COLOR_RESET = '\x1b[0m';
|
|
const COLOR_YELLOW = '\x1b[33m';
|
|
|
|
// Mark transpiled classes as __PURE__ so that UglifyJS can remove them
|
|
module.exports = function _() {
|
|
return {
|
|
visitor: {
|
|
ClassExpression: function ClassExpression(path) {
|
|
const name = path && path.parent && path.parent.id && path.parent.id.name;
|
|
// eslint-disable-next-line
|
|
console.error(` ==> emitting __PURE__ class ${COLOR_YELLOW}${name}${COLOR_RESET}`);
|
|
path.addComment('leading', '#__PURE__');
|
|
}
|
|
}
|
|
};
|
|
};
|