GithubHelp home page GithubHelp logo

Comments (6)

jerrypena1 avatar jerrypena1 commented on May 8, 2024

I'm having a similar issue with NuxtJS 3

  • package.json
 "devDependencies": {
    "nuxt": "3.0.0-rc.1"
  },
  "dependencies": {
    "tw-elements": "^1.0.0-alpha12"
  }
  • tailwind.config.js
module.exports = {
  content: ['./**/*.{html,js,vue}', './node_modules/tw-elements/dist/js/**/*.js'],
  plugins: [require('tw-elements/dist/plugin.js')],
}
  • Error

Uncaught SyntaxError: The requested module '/_nuxt/plugins/tw-elements.js' does not provide an export named 'default' (at client.mjs:5:8)

from tailwind-elements.

carlos-dubon avatar carlos-dubon commented on May 8, 2024
<script lang="ts">
  import { onMount } from "svelte";
  import "../styles/globals.css";

  // import tw-elements with no SSR
  onMount(async () => {
    await import("tw-elements");
  });
</script>

<slot />
module.exports = {
  content: [
    "./src/**/*.{html,js,svelte,ts}",
    "./node_modules/tw-elements/dist/js/**/*.js",
  ],
  theme: {
    extend: {},
  },
  plugins: [require("tw-elements/dist/plugin")],
};

this worked for me on svelte-kit

from tailwind-elements.

domgom avatar domgom commented on May 8, 2024

@carlos-dubon could you try to see if the timepicker works? I get the datepicker working but not the timepicker with your config.

from tailwind-elements.

domgom avatar domgom commented on May 8, 2024

@carlos-dubon about datepicker, does your it stop working for you when switching between prefetched svelte tabs? It only works for me on hard manual browser refresh, not coming from another route 😞

from tailwind-elements.

Trochonovitz avatar Trochonovitz commented on May 8, 2024

Hi, Tailwind Elements in the newewst version (beta1 released a two weeks ago) works fine with Svelte - you got to import library in lifecycle method like @carlos-dubon showed. Timepicker on the other hand is not working indeed but this is our problem which was already solved. Proper fix will be released with beta2.

FYI in a couple of days we are going to publish bunch of tutorials how to integrate TE with most popular CSR and SSR frameworks.

from tailwind-elements.

Trochonovitz avatar Trochonovitz commented on May 8, 2024

Hi, we just have launched bunch of integration tutorials - both with CSR and SSR frameworks. If you have more questions about integration or you still got some problems with particular components, let us know by adding new issue / topic in discussions section (if there are some unclear informations or just want let us know about something).

from tailwind-elements.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.