Comments (5)
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.
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.
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.
@Kagami Would you mind show me how to pre-compiled bundles? I'm new in nodejs.
from avif.js.
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)
- Doesn't work on first page load HOT 1
- Doesn't work on Chrome Mobile HOT 2
- Polyfill path silently fails with Netflix test data HOT 4
- ?src= query parameter for alternative test files HOT 3
- Need help to generate a UMD module HOT 2
- Add support for the alpha channel
- Vue support HOT 3
- Static html support HOT 1
- Polyfill fails on refresh for individual images
- Vitepress introduces plug-ins to compile error
- Support HDR AVIF via HDR Canvas
- Demo is not working
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from avif.js.