Giter Site home page Giter Site logo

Comments (2)

thepassle avatar thepassle commented on July 21, 2024

For the foreseeable future, not all packages will make use of export maps yet, so I think we'll have to have two ways for now:

If a package uses export maps:

 "exports": {
   "customElements": "custom-elements.json",
 }

If a package does not use export maps yet, add a field in the package.json:

"customElements": "custom-elements.json"

from custom-elements-manifest.

justinfagnani avatar justinfagnani commented on July 21, 2024

As discussed in our meeting about this, a manifest could be included in package exports if the package intends it to be an importable JSON module from a consuming package, but this isn't a primary use case.

The use case we most need to cover is for a source analyzing tool to be able to discover a package.json and custom elements manifest given a base path and a specifier, resolving the specifier within the source's available node_modules tree, not the tool's. This may require implementing part of Node's module resolution algorithm as a utility function. We'll need this whether or not the custom elements manifest is exported.

I think we can close this as an issue that's part of the manifest spec and figure it out in tools.

from custom-elements-manifest.

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.