Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F88743555
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
Sun, Oct 20, 11:33
Size
899 B
Mime Type
text/x-c++
Expires
Tue, Oct 22, 11:33 (2 d)
Engine
blob
Format
Raw Data
Handle
21814780
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