-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Standalone modules w/ source map support #10
base: master
Are you sure you want to change the base?
Conversation
For inclusion using require/import + npm-style dependency resolution. NOTE: this doesn't actually work due to direct require()ing of SASS.
@@ -1,5 +1,7 @@ | |||
'use strict'; | |||
|
|||
import 'source-map-support/register'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If components are to be imported individually, this probably needs to be in each entrypoint.
The story behind each component I'm not sure where this all ended up. @sconnelley could probably say more. |
If we're publishing "build ingredients" to be |
@mojodna we were trying to avoid the additional requirement of having to manually Since Is there a way to make a build step that 'sees' which modules are in the dependency tree, from Browserify/Webpack, and concatenates their |
Browserify has Looks like webpack has similar functionality (via |
This is a one-liner, no?
Sounds like a webpack plugin (or loader, though I'm not sure it has access to the necessary stuff) could be in order, if one doesn't already exist and we decide that we need webpack. This seems complicated though. |
It's a one-liner for each module that needs to import styles, and an easy one to miss. Until I got used to using Leaflet, I would always forget to bring in the styles and then the tiles would be all in the wrong place on-screen. I can imagine a similar situation with Panorama. Anything we can do to ease use for first-timers will make a big difference, since first impressions matter a lot with new libraries. Of course, there's a limit to how much effort we can/should put into this. Maybe we punt, since our time is limited at this point. Some initial investigation seems worthwhile though, at least a spike to determine how much work it would be to automate importing styles for dependent modules. IMHO. (And of course saying that puts the ball in my court 😉) |
(For discussion)
For inclusion using
require
/import
+ npm-style dependency resolution (which can't assume a transpilation step, hence the use ofbabel
in aprepublish
script (which also runs afternpm install
, potentially obviating the need to includedist/
in git)).NOTE: this doesn't actually work due to direct
require()
ing of SASS:It's also possible that the use of
source-map-support
may cause problems in non-V8-based browsers.