bigskysoftware / bigskysoftware/htmx-extensions
path-deps: Cannot set properties of undefined (setting 'PathDeps')
- Dominant language
- JavaScript
- Stars
- 284
- Forks
- 88
- PR merge metrics
- No merged PRs in 30d
Description
I'm using Vite. In development mode it works fine. But somethings going wrong when budling.:
`Uncaught TypeError: Cannot set properties of undefined (setting 'PathDeps')`
The debug extension is working fine.
htmx.js
```
import htmx from 'htmx.org';
window.htmx = htmx;
```
main.js
```
import './htmx.js';
import 'htmx-ext-path-deps';
import "htmx-ext-debug";
import "htmx-ext-alpine-morph";
...
```
vite.config.js
```
plugins: [
inject({
htmx: 'htmx.org',
}),
...
```
Contributor guide
Research direction
Read htmx.js, main.js, and vite.config.js together, then reproduce the production bundle with the shown imports and inject configuration. Trace where htmx-ext-path-deps assigns PathDeps and compare that with the available htmx object; done means the bundle no longer throws this error and the extension works in the bundled application.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, vite
- Domain
- build-system, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 38/100