Inline scripts in HTML files
This commit is contained in:
17
modules/actions/utils/getEntryPoint.js
Normal file
17
modules/actions/utils/getEntryPoint.js
Normal file
@ -0,0 +1,17 @@
|
||||
// Virtual module id; see rollup.config.js
|
||||
import entryManifest from 'entry-manifest';
|
||||
|
||||
export default function getEntryPoint(name, format) {
|
||||
let entryPoints;
|
||||
entryManifest.forEach(manifest => {
|
||||
if (name in manifest) {
|
||||
entryPoints = manifest[name];
|
||||
}
|
||||
});
|
||||
|
||||
if (entryPoints) {
|
||||
return entryPoints.find(e => e.format === format);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
Reference in New Issue
Block a user