UNPKG

aurelia-webpack-plugin

Version:

A plugin for webpack that enables bundling Aurelia applications.

18 lines (17 loc) 705 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HtmlDependenciesPlugin = void 0; const BaseIncludePlugin_1 = require("./BaseIncludePlugin"); const html_requires_loader_1 = require("./html-requires-loader"); class HtmlDependenciesPlugin extends BaseIncludePlugin_1.BaseIncludePlugin { parser(compilation, parser, addDependency) { parser.hooks.program.tap("Aurelia:HtmlDependencies", () => { const deps = parser.state.current[html_requires_loader_1.htmlSymbol]; if (!deps) return; deps.forEach(addDependency); }); } } exports.HtmlDependenciesPlugin = HtmlDependenciesPlugin; ;