GithubHelp home page GithubHelp logo

Comments (9)

maxevilmind avatar maxevilmind commented on May 18, 2024 1

@101arrowz amazing! thank you for pushing it quickly!
I will test it out today

from fflate.

maxevilmind avatar maxevilmind commented on May 18, 2024 1

yep, import works perfectly now
thank you for adding the changes!

from fflate.

101arrowz avatar 101arrowz commented on May 18, 2024

What bundler are you using? I rely on the "browser" key of package.json to replace the import in the browser.

from fflate.

maxevilmind avatar maxevilmind commented on May 18, 2024

@101arrowz we don't have any bundler 🙈
We have a build-less open-wc setup (more on that https://modern-web.dev/guides/going-buildless/es-modules). That's pretty much what brought us to use fflate as it provides ESM exports and other similar libraries are common js. I am not sure if it is somehow possible to utilize this key while using no bundler.

from fflate.

101arrowz avatar 101arrowz commented on May 18, 2024

If that's the case, I will change the build script to add a version that supports true ESM. Is there nothing in that guide that allows custom module resolution?

from fflate.

maxevilmind avatar maxevilmind commented on May 18, 2024

@101arrowz wow that would be really amazing to get the true ESM version.
Is there nothing in that guide that allows custom module resolution?
I think unless I write my own tool for it - there is no way...

from fflate.

101arrowz avatar 101arrowz commented on May 18, 2024

@maxevilmind I've pushed v0.3.6 with commit 214ec2f. Try the import again. Thanks for the feature request!

from fflate.

101arrowz avatar 101arrowz commented on May 18, 2024

Did it end up working for you?

from fflate.

101arrowz avatar 101arrowz commented on May 18, 2024

No idea how useful this is for you at this point @maxevilmind, but you probably would have been able to get the package working like this:

web-dev-server --config config.wds.mjs

In config.wds.mjs:

export default {
  nodeResolve: {
    browser: true
  }
}

Obviously I'm not going to revert the package to before this bugfix, just thought it may be useful to know.

from fflate.

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.