Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F91579550
ExternalsPlugin.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Nov 12, 09:46
Size
899 B
Mime Type
text/x-c++
Expires
Thu, Nov 14, 09:46 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22286716
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
ExternalsPlugin.js
View Options
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict"
;
const
ExternalModuleFactoryPlugin
=
require
(
"./ExternalModuleFactoryPlugin"
);
/** @typedef {import("../declarations/WebpackOptions").Externals} Externals */
/** @typedef {import("./Compiler")} Compiler */
class
ExternalsPlugin
{
/**
* @param {string | undefined} type default external type
* @param {Externals} externals externals config
*/
constructor
(
type
,
externals
)
{
this
.
type
=
type
;
this
.
externals
=
externals
;
}
/**
* Apply the plugin
* @param {Compiler} compiler the compiler instance
* @returns {void}
*/
apply
(
compiler
)
{
compiler
.
hooks
.
compile
.
tap
(
"ExternalsPlugin"
,
({
normalModuleFactory
})
=>
{
new
ExternalModuleFactoryPlugin
(
this
.
type
,
this
.
externals
).
apply
(
normalModuleFactory
);
});
}
}
module
.
exports
=
ExternalsPlugin
;
Event Timeline
Log In to Comment