Skip to content

[QUESTION] How to include alpine scripts? #1

Open
@go4cas

Description

Really keen to give this lib a try! Well done!

I want to also split my alpine js logic, similar to how you do withe the HTML views., i.e. having a folder structure similar to the following:

src
|--components
|  |--my-content
|     |--index.html
|     |--index.js
|  |--my-footer
|     |--index.html
|     |--index.js
|  |--my-header
|     |--index.html
|     |--index.js
|--index.html   (this is the main entry point)

My questions:

  1. How would you suggest that I include the individual scripts with their views?
  2. How would I import alpine.js? Should I have a operate index.js that is included in the main index.html?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions