Skip to content

Commit

Permalink
IMPROVE: Make plugin run only for HTML files
Browse files Browse the repository at this point in the history
Parcel executes all plugins each time it runs.
This can cause an issue since this plugin is only for bundling HTML. A
filter has been added to make plugin run only when entryFile is of type
html.

v1.0.3
  • Loading branch information
VladimirMikulic committed Aug 10, 2020
1 parent 09fafd1 commit 6a79ad3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions lib/index.js
Expand Up @@ -7,6 +7,8 @@ module.exports = async bundler => {
: Array.from(bundle.childBundles);

for (const bundleItem of bundles) {
if (bundleItem.type !== 'html') continue;

const importsManager = new ImportsManager(bundleItem);
importsManager.updateEntryFileImports();
importsManager.wrapImportFilesCode();
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "parcel-plugin-gas-imports",
"version": "1.0.2",
"version": "1.0.3",
"description": "Parcel plugin that enables bundling of Google App Script HTML.",
"main": "./lib/index.js",
"scripts": {
Expand Down

0 comments on commit 6a79ad3

Please sign in to comment.