mirror of
https://github.com/danog/telegram-tt.git
synced 2024-12-11 16:49:44 +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 },
|
|
};
|
|
}
|
|
};
|