mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-12-03 05:10:04 +01:00
Replace webpack with esbuild
This commit is contained in:
1 parent
7e3e2dc5b9
commit
ecb1b76891
13 files changed
+750
-7990
No files matched your search
@@ -0,0 +1,16 @@
|
||||
const path = require('path');
|
||||
const { compilePugTemplate } = require('./pug-template.cjs');
|
||||
|
||||
const angularHost = require(path.join(__dirname, '..', 'node_modules', '@angular', 'build', 'src', 'tools', 'angular', 'angular-host.js'));
|
||||
const createAngularCompilerHost = angularHost.createAngularCompilerHost;
|
||||
|
||||
angularHost.createAngularCompilerHost = function (...args) {
|
||||
const host = createAngularCompilerHost.apply(this, args);
|
||||
const readResource = host.readResource;
|
||||
host.readResource = async function (fileName) {
|
||||
return fileName.endsWith('.pug') ? compilePugTemplate(fileName) : readResource.call(this, fileName);
|
||||
};
|
||||
return host;
|
||||
};
|
||||
|
||||
global.angularPugHook = true;
|
||||
Reference in new issue
Block a user