Cannot build a project using beta-2 with parcel.js #1813
-
I'm having an issue upgrading to the new beta-2, but wanted to sanity check it first, as I figure it's mostly likely something I've done wrong. I'm using Parcel.js as my bundler, and I've updated my project to import and initialise the Modal and Tab components. However, when I attempt to build it, it fails complaining that it can't find the file: node_modules\tw-elements\src\js\data\chart\charts.js Now, that path is missing the dist folder before src, however I'm wondering why this file is even being requested, given that I'm not using charts, at least not intentionally? I would have thought that the tree-shaking would have meant that file was ignored by the buil? I'm sure that at some point in my searching today I've seen a tailwind.config.js file that had charts.js in it, but I haven't been able to find it again. You can see the build report on GitHub: https://github.com/manzanotti/saferstreetmaker/actions/runs/4839138453/jobs/8623987964?pr=135 Any suggestions as to what I've done wrong here appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi, I'm not really sure what could happen. Maybe some of those things could help?
|
Beta Was this translation helpful? Give feedback.
If the modal is working properly without
initTE
method this means your app is most likely using theumd
version oftw-elements
. WithoutinitTE
method the autoinits (inits via data attributes) are not beeing added ines
format.I have few questions that could help to locate the problem:
type="module"
) didn't make the behavior change? It should make the package use thetw-elements.es.min.js
and not look for charts.js file. Maybe it will show the imported one in you browser devtools (i.e. cardSources
for chrome => look for js files from tw-elements)umd
format theinitTE
method i…