preline icon indicating copy to clipboard operation
preline copied to clipboard

may I ask how to install for nuxt3?

Open yashika opened this issue 3 years ago • 3 comments

Thank you

yashika avatar Jun 12 '22 16:06 yashika

Hey, @yashika!

You may try out these steps to achieve it:

  1. Create preline.client.js in plugins directory

  2. Add JavaScript insisde preline.client.js

import preline from 'preline/dist/hs-ui.bundle' export default defineNuxtPlugin(() => {})

  1. Include the preline plugin in tailwind.config.js in plugins array plugins: [ require('preline/plugin') ]

Done! Please, let us know if the above steps worked out for you.

Thanks!

green-cats avatar Jun 13 '22 19:06 green-cats

Hey, @yashika!

You may try out these steps to achieve it:

  1. Create preline.client.js in plugins directory
  2. Add JavaScript insisde preline.client.js

import preline from 'preline/dist/hs-ui.bundle' export default defineNuxtPlugin(() => {})

  1. Include the preline plugin in tailwind.config.js in plugins array plugins: [ require('preline/plugin') ]

Done! Please, let us know if the above steps worked out for you.

Thanks!


Thank you so much. @green-cats green-cats QQ截图20220614134615

It works well in ' yarn dev' mode. but I got below warnning message after I ran "yarn build" , please check it.

yashika avatar Jun 14 '22 05:06 yashika

Hey @yashika ,

Glad to hear that it worked! We've just pushed an update (v1.1.1) which includes fix for this scenario.

Run yarn upgrade preline to update the preline libirary and all should work as expected.

Thanks!

green-cats avatar Jun 14 '22 19:06 green-cats