UNPKG

818 BJavaScriptView Raw
1// var ident = 0
2
3function FmdTemplatePlugin (options) {
4 options || (options = {})
5 this.prefix = options.prefix || 'gallery/'
6 this.chunkName = options.name || "vendors"
7 this.deps = options.deps || []
8 // this.filenameTemplate = options.filenameTemplate || 'vendors.js'
9 // this.identId = __filename + ident ++
10 //
11 // this._vendorModuleNames = []
12}
13
14FmdTemplatePlugin.prototype.apply = function (compiler) {
15 var _self = this
16
17 compiler.plugin("this-compilation", function(compilation) {
18 var FmdTemplatePlugin = require("./FmdMainTemplate")
19
20 compilation.apply(new FmdTemplatePlugin(
21 _self.prefix, _self.chunkName, _self.deps, {
22 // optionalAmdExternalAsGlobal: this.target === "umd2",
23 // namedDefine: this.umdNamedDefine
24 }
25 ))
26 })
27}
28
29module.exports = FmdTemplatePlugin