Git Product home page Git Product logo

Comments (5)

kenvix avatar kenvix commented on May 28, 2024 1

Have you successfully used this library without a bundler or using browserify from the cli?

Actually, I'm at this step:

browserify reg.js -o bundle.js

/Volumes/MHDCS/git_repositories/github/xyz/node_modules/avif.js/avif.js:78
export function register(regPromise, opts) {
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

@sycured You need to use esmify to add ES Modules support to browserify:

npm install esmify browser-resolve
browserify reg.js  -p esmify -o avif-bundle.js

Note that you also need to run browserify for avif-sw.js

from avif.js.

Kagami avatar Kagami commented on May 28, 2024

It was possible some time ago, but then I split codebase a bit for easier maintainability. You may check out earlier commits.

I will consider providing pre-compiled bundles though.

from avif.js.

lionirdeadman avatar lionirdeadman commented on May 28, 2024

I've tried V1 but it seems it doesn't work with my AVIFs that I made with your go-avif tool while it does in the demo, I've not been able to see which commit changed it from not needing a bundler to needing one, if you could point to that it'd be nice.

Although, Pre-compiled bundles would be better. I would really appreciate it.

from avif.js.

hoangvietfreelancer avatar hoangvietfreelancer commented on May 28, 2024

@Kagami Would you mind show me how to pre-compiled bundles? I'm new in nodejs.

from avif.js.

sycured avatar sycured commented on May 28, 2024

Have you successfully used this library without a bundler or using browserify from the cli?

Actually, I'm at this step:

browserify reg.js -o bundle.js

/Volumes/MHDCS/git_repositories/github/xyz/node_modules/avif.js/avif.js:78
export function register(regPromise, opts) {
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'

from avif.js.

Related Issues (13)

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.