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

Add Nuxt.js module #37

Open
isneezy opened this issue Sep 4, 2020 · 0 comments
Open

Add Nuxt.js module #37

isneezy opened this issue Sep 4, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@isneezy
Copy link
Owner

isneezy commented Sep 4, 2020

Is your feature request related to a problem? Please describe.
There are lots of steps involved to integrate with Nuxt.js, we want to make it easier and reduce the effort and time required to make this component/library work with Nuxt.js

Describe the solution you'd like
Create a Nuxt.js module that will register the component and also inject all the CSS files required for it to work.

Describe alternatives you've considered
Creating a Nuxt.js plugin

// plugins/vue-selectize.js
import Vue from "vue";
import VueSelectize from "@isneezy/vue-selectize";
Vue.component("v-selectize", VueSelectize);

Register the plugin and the selectize.js css files

// nuxt.config.js
export default {
  head: {
    link: [
      {
        rel: "stylesheet",
        type: "text/css",
        href:
          "https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.12.6/css/selectize.bootstrap3.min.css"
      }
    ]
  },
  plugins: ["~/plugins/vue-selectize"]
};
@isneezy isneezy added the enhancement New feature or request label Sep 4, 2020
@isneezy isneezy pinned this issue Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant