mirror of
https://github.com/danog/telegram-tt.git
synced 2024-11-30 04:39:00 +01:00
20 lines
454 B
JavaScript
20 lines
454 B
JavaScript
/* eslint-env node */
|
|
// Comes from: https://raw.githubusercontent.com/statoscope/statoscope.tech/main/custom-ext.js
|
|
|
|
module.exports = class WebpackContextExtension {
|
|
constructor() {
|
|
this.context = '';
|
|
}
|
|
|
|
handleCompiler(compiler) {
|
|
this.context = compiler.context;
|
|
}
|
|
|
|
getExtension() {
|
|
return {
|
|
descriptor: { name: 'custom-webpack-extension-context', version: '1.0.0' },
|
|
payload: { context: this.context },
|
|
};
|
|
}
|
|
};
|