bestguy / sveltestrap

Bootstrap 4 & 5 components for Svelte
https://sveltestrap.js.org
MIT License
1.3k stars 183 forks source link

Poppover broken with the latest sveltekit #474

Closed lovasoa closed 1 year ago

lovasoa commented 2 years ago

I opened an issue in sveltekit too: https://github.com/sveltejs/kit/issues/4504

The latest update of sveltekit breaks the poppover element from this repo.

qbunt commented 2 years ago

Just got bit by this too, what's super odd is that I'm seeing references to components that shouldn't be using Popover or popper at all.

<script>
  import { Col, Container, Row } from 'sveltestrap'
</script>

<Container>
  <Row>
    <Col>
      <h2>hi</h2>
    </Col>
  </Row>
</Container>

I'm seeing

import { popperGenerator, detectOverflow } from "./createPopper.js";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1032:15)
    at Module._compile (node:internal/modules/cjs/loader:1067:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1155:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:168:29)
    at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
    at async Promise.all (index 0)
    at async ESMLoader.import (node:internal/modules/esm/loader:337:24)
nstuyvesant commented 2 years ago

This appears to be a duplicate of https://github.com/bestguy/sveltestrap/issues/463. If so, please close this issue and contribute to the other one.