This Plugin for parcel v2 allows you to ignore files in resolving phase using a configuration in you package.json.
yarn add -D parcel-resolver-externals-excluder
npm install --save-dev parcel-resolver-externals-excluder
-
In your .parcelrc configure the resolver
-
NOTE: the default resolver should be in the list after this plugin, to use the default behavior for not excluded files.
{ "extends": "@parcel/config-default", "resolvers": ["parcel-resolver-externals-excluder", "..."] }
-
In your package.json configure the external files to be excluded
{ "externalsExcluder": [ "your/absolute/paths", "*.fileType", "yourFolders/**/*" ] }