fix issue with resolve sometimes looking for JS files when loading views or styles based on package.main