Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use it with Webpack? #11

Open
gasatrya opened this issue Nov 1, 2022 · 0 comments
Open

How to use it with Webpack? #11

gasatrya opened this issue Nov 1, 2022 · 0 comments
Labels
bundlers documentation Improvements or additions to documentation

Comments

@gasatrya
Copy link

gasatrya commented Nov 1, 2022

I tried to import is-land.js using Webpack. Run npm install @11ty/is-land then required it inside the entry const island = require('@11ty/is-land'). In the terminal, I get this warning message.

WARNING in ./node_modules/@11ty/is-land/is-land.js 205:18-38
Critical dependency: the request of a dependency is an expression
 @ ./src/_assets/js/index.js 1:15-39

Webpack then merge is-land.js along with the other vendor inside a single file vendors.js, then I load it on my layout file <script src="{{ '/assets/vendors.js' | url }}" defer></script>

Then I tried to load alpinejs on the page.

<is-land on:visible import="https://unpkg.com/alpinejs">
</is-land>

But I got this error message

image

@zachleat zachleat added bundlers documentation Improvements or additions to documentation labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bundlers documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants