Closed KememChan closed 1 year ago
how can i use jquery in svelte template?
emmm, you can use jquery and all packages from npm just like the following code
pnpm add jquery # npm install -S jquery # yarn add jquery
<script lang="ts"> import $ from 'jquery'; // add this line </script> <main> </main> <style> </style>
The $ prefix is reserved, and cannot be used for variable and import namessvelte(illegal-declaration)
you can use import Jquery from 'jquery';
import Jquery from 'jquery';
how can i use jquery in svelte template?