Coder Social home page Coder Social logo

Comments (3)

henrygd avatar henrygd commented on August 16, 2024 1

No worries, you didn't waste my time. Now I know in case anyone else runs into the same thing. And trust me, I've spent my fair share of hours troubleshooting webpack / babel errors.

Good luck with your project!

from bigpicture.

henrygd avatar henrygd commented on August 16, 2024

Just to clarify, your webpack build gives you a css file in your document head that does not visibly apply style to the page even though inspector shows individual elements have the style applied? And this is for all elements on your page, not just elements related to bigpicture? I feel like I must be misinterpreting.

And if you just use like below it's okay?

import BigPicture from "bigpicture";

const link = document.querySelector(".link");
link.addEventListener("click", e => {
  e.preventDefault();
  BigPicture({
    el: link,
    ytSrc: "8ktONdU_wXU"
  });
});

from bigpicture.

joepagan avatar joepagan commented on August 16, 2024

Hey @henrygd thanks for getting back to me.

Sorry for wasting your time, I've just figured out what the issue was (me), this was nothing to do with bigpicture...

I realised that taking a closer look at my css files they actually included some javascript (meaning that the extract css plugin wasn't working correctly) which obviously resulted the styles not loading.

I apparently missed this really important announcement for webpack's extract-text-webpack-plugin (which probably wasn't there at the time I started looking at webpack4):

Since webpack v4 the extract-text-webpack-plugin should not be used for css. Use mini-css-extract-plugin instead.

After setting up the newer plugin mini-css-extract-plugin my styles are loading correctly.

Really strange that I ended up getting quite far on a project without seeing a similar problem before & especially strange that your package seemed to trigger this issue for me.

Appreciate the follow up message & your contribution to the scene.

from bigpicture.

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.