GithubHelp home page GithubHelp logo

ES6 import/linter error about tippyjs HOT 12 CLOSED

StefanFeser avatar StefanFeser commented on May 17, 2024
ES6 import/linter error

from tippyjs.

Comments (12)

jgujgu avatar jgujgu commented on May 17, 2024 2

For those using Tippy.js 6.x, similar to the advice above, just use this:

import tippy from 'tippy.js/dist/tippy-bundle.umd.min.js';

from tippyjs.

StefanFeser avatar StefanFeser commented on May 17, 2024 1

Thanks! Really appreciate your work!

from tippyjs.

atomiks avatar atomiks commented on May 17, 2024

Yes you're right, it should link the unminified es5 version, thanks. Fixed it.

from tippyjs.

StefanFeser avatar StefanFeser commented on May 17, 2024

Thanks @atomiks!

Did you also push it to NPM? Didn't get the changes after reinstalling it.

from tippyjs.

atomiks avatar atomiks commented on May 17, 2024

About to push 0.6.0 right now with a bunch of changes, sorry haha

from tippyjs.

atomiks avatar atomiks commented on May 17, 2024

Should be published now 😃

from tippyjs.

StefanFeser avatar StefanFeser commented on May 17, 2024

Sorry to tell you but I still don't get the changes via npm install ;)

from tippyjs.

Romick2005 avatar Romick2005 commented on May 17, 2024

Hi, same here. Not works in version "0.17.0" also.

node_modules\tippy.js\dist\tippy.css Unexpected token (1:0)
You may need an appropriate loader to handle this file type.

from tippyjs.

atomiks avatar atomiks commented on May 17, 2024

@Romick2005 - It's just minified CSS, why would you get that error?

from tippyjs.

darrensw777 avatar darrensw777 commented on May 17, 2024

I had an issue with parsing the css separately as well, simple workaround for me was to full Tippy from the file which includes the css:

import tippy from 'tippy.js/dist/tippy.all.js';

from tippyjs.

atomiks avatar atomiks commented on May 17, 2024

You need a webpack loader for the CSS import as well. But yeah the <head> CSS inject method using the all.js UMD version is a workaround.

from tippyjs.

darrensw777 avatar darrensw777 commented on May 17, 2024

You need a webpack loader for the CSS import as well. But yeah the <head> CSS inject method using the all.js UMD version is a workaround.

I am using webpack, it doesn't like it for some reason, says there's a parse error - if you need more info please shout and I'll add it on here

from tippyjs.

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.