parcel@2.0.0-canary.1591, see Code Sample for full repro script.
🤔 Expected Behavior
npx parcel build succeeds.
😯 Current Behavior
🚨 Build failed.
Error: Cannot use 'in' operator to search for 'key' in undefined
TypeError: Cannot use 'in' operator to search for 'key' in undefined
at getJSONHighlightLocation (/home/ryan/repro/node_modules/parcel/node_modules/@parcel/diagnostic/lib/diagnostic.js:165:19)
at getJSONSourceLocation (/home/ryan/repro/node_modules/parcel/node_modules/@parcel/diagnostic/lib/diagnostic.js:207:11)
at EntryResolver.resolveEntry (/home/ryan/repro/node_modules/parcel/node_modules/@parcel/core/lib/requests/EntryRequest.js:228:62)
at async Object.run (/home/ryan/repro/node_modules/parcel/node_modules/@parcel/core/lib/requests/EntryRequest.js:57:16)
at async RequestTracker.runRequest (/home/ryan/repro/node_modules/parcel/node_modules/@parcel/core/lib/RequestTracker.js:777:20)
at async AssetGraphBuilder.runEntryRequest
(/home/ryan/repro/node_modules/parcel/node_modules/@parcel/core/lib/requests/AssetGraphRequest.js:344:18)
at async $dad2a694f9c45026$export$2e2bcd8739ae039._runFn
(/home/ryan/repro/node_modules/parcel/node_modules/@parcel/utils/lib/index.js:34004:13)
at async $dad2a694f9c45026$export$2e2bcd8739ae039._next
(/home/ryan/repro/node_modules/parcel/node_modules/@parcel/utils/lib/index.js:33997:9)
💁 Possible Solution
It seems the multiple source logic from package.json is buggy.
npx parcel build *.html *.tmpl works.
package.json "source": ["*.{tmpl.html}"] works
removing b.tmpl works-- building one HTML and one TMPL file.
🔦 Context
I'm using parcel to process HTML templates for another tool to render.
🐛 bug report
Building with the new (in canary) feature of package.json source glob patterns breaks in some conditions with custom file types.
🎛 Configuration (.babelrc, package.json, cli command)
parcel@2.0.0-canary.1591, see Code Sample for full repro script.
🤔 Expected Behavior
npx parcel build
succeeds.😯 Current Behavior
💁 Possible Solution
It seems the multiple source logic from package.json is buggy.
npx parcel build *.html *.tmpl
works."source": ["*.{tmpl.html}"]
worksb.tmpl
works-- building one HTML and one TMPL file.🔦 Context
I'm using parcel to process HTML templates for another tool to render.
💻 Code Sample
tiny repro script:
🌍 Your Environment