Make it possible to import small modules of the library independently
See original GitHub issueIf we want to ship extra modules, like query diffing, that aren’t always included, there are only two ways I know to make that work with today’s bundlers:
- Ship every part as a separate NPM package:
import diffQueries from 'apollo-diff-queries';
- Ship multiple files in the NPM package:
import diffQueries from 'apollo-client/diff-queries';
I currently prefer the second because it will make testing and version management much easier, plus it doesn’t require people to install a bunch of packages. But to do it we have to move the files before publish to put them in the right place (they have to be in the root of the published package I think).
I’m happy to implement this so that we can start cracking on some of the stuff in: https://github.com/apollostack/apollo-client/issues/157#issuecomment-216401284
Looking for feedback from @jbaxleyiii, the tooling and publishing mastermind.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:3
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Python Modules: Creating, Importing, and Sharing - Stack Abuse
One important aspect when writing modular Python apps is locating the modules that need to be imported. While modules of the standard Python ......
Read more >Python import: Advanced Techniques and Tips
Use modules, packages, and namespace packages; Handle resources and data files inside your packages; Import modules dynamically at runtime; Customize Python's ...
Read more >6. Modules — Python 3.11.1 documentation
Such a file is called a module; definitions from a module can be imported into other modules or into the main module (the...
Read more >Importing Modules - Python 3 Notes
In this video tutorial, we learned how to import a Python script you yourself created as a module and re-use the functions you...
Read more >How To Make Tree Shakeable Libraries - Theodo blog
Create an application module tree by looping through all the dependencies and sub dependencies imported by the entry file; Identify for each ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds great!
I’ll just add stuff in
src
then and assume it will be importable eventually.I think this is done since
import gql from 'apollo-client/gql'
works great!