Comments (4)
of course it understands optional chaining
It understands first party code with chaining, not third party modules. lite-youtube is a third party ESM module; you have to tell webpack that (which is why it's saying "I don't have a loader for this" and why it chokes on the optional chaining because it's not applying the same build config for your code as that module).
from lite-youtube.
Just in case anyone using nuxt 2 encountered this issue, it can be resolved by adding the package to build.transpile
array in nuxt.config.js
file.
{
build: {
transpile: ['@justinribeiro/lite-youtube']
}
}
Thanks @justinribeiro for such an awesome package.
from lite-youtube.
this.domRefImg?.fallback?.setAttribute('alt',
${this.videoPlay}: ${this.videoTitle}
);
Whichever version of webpack you're using doesn't understand optional chaining. That's what the error message is saying, and isn't an issue with lite-youtube. Consult webpack/webpack#10227 for additional information.
from lite-youtube.
this.domRefImg?.fallback?.setAttribute('alt',
${this.videoPlay}: ${this.videoTitle}
);Whichever version of webpack you're using doesn't understand optional chaining. That's what the error message is saying, and isn't an issue with lite-youtube. Consult webpack/webpack#10227 for additional information.
Nuxt 2 uses webpack 4 and of course it understands optional chaining, Im using it throughout my entire codebase for 5 websites.
from lite-youtube.
Related Issues (20)
- Package should specify that it's a module
- Poster image still gets lazy-loaded when setting posterloading to eager
- Jpeg fallback not used when webp is missing HOT 5
- Use official YouTube logo HOT 1
- Pause videos not in view
- errors in Next.js due to export HOT 2
- Best method to avoid Cumulative Layout Shift? HOT 2
- CDN: Uncaught SyntaxError: Unexpected token 'export' (at lite-youtube.js:1:1) HOT 5
- Google indexing errors HOT 6
- Probable bug wrt capitalization HOT 3
- Doesn't work well when aspect ratio is different from 16:9
- Remove `#frame::before`? HOT 3
- Poster Fallback JPG doesn't work in 1.5.0 with FF HOT 6
- Thumbnails not rendering HOT 3
- Uncaught (in promise) Error: Orphaned iframed HOT 3
- Adjust warmConnections if using nocookie attribute, add profile image domain HOT 2
- Bug: Poster Image Not Loading @ certain Resolutions
- lite-youtube <-> prevent Cookie/Local storage if user selects "Deny" from Consent Management System Modal || EU GDPR HOT 1
- nuxt2 problem HOT 1
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 lite-youtube.