Skip to content
This repository has been archived by the owner on Dec 21, 2017. It is now read-only.

Webpack #13

Merged
merged 2 commits into from
Jun 15, 2016
Merged

Webpack #13

merged 2 commits into from
Jun 15, 2016

Conversation

lobsteropteryx
Copy link
Contributor

Working sample with webpack. I'm not sure how to get the typings to work properly with esri-system-js--it seems like pulling in the JSAPI typings causes some conflict, since they both get aliased to esri; using just the JSAPI typings, you have to use the older import syntax.

I'm an Angular n00b, so maybe you can get both working together, just thought this might be a useful jumping off point.

  • Removes systemjs dependencies
  • Brings in typings for dojo and jsapi
  • Adds webpack and config
  • Edits index.html to require bundles

* Removes systemjs dependencies
* Brings in typings for dojo and jsapi
* Adds webpack and config
* Edits index.html to require bundles
@tomwayson
Copy link
Owner

@lobsteropteryx I'm very interested in getting this working and merged. It looks like a potentially cleaner solution than the SystemJS hack that we've been relying upon until now.

I've pulled your branch locally and run npm install successfully. However, after running npm start I get the following error:

Output filename not configured.

Looks like you may not have included the webpack config file? If so, just push it up in a follow up commit to your same branch and I'll try again.

Also, I apologize for the delay in responding. Things are a bit busy w/ UC on the horizon, and I'm also working 100% on an EmberJS app these days, so it's a rare moment when I have time to switch gears and dig into Angular 2 / webpack. Please bare with me if I'm slow to respond. Like I said above, I'm very interested in getting this working.

Thanks!

cc @jwasilgeo

@tomwayson tomwayson self-assigned this Jun 10, 2016
@lobsteropteryx
Copy link
Contributor Author

Good catch, it was being gitignored. Sorry about that!

@jwasilgeo
Copy link

This looks really promising. I will review this as well at some point today. Thanks for the idea and contribution, @lobsteropteryx.

@jwasilgeo
Copy link

@lobsteropteryx I gave it a spin, and I like it! I don't think I have any notable feedback or questions at the moment.

@tomwayson tomwayson merged commit feda313 into tomwayson:master Jun 15, 2016
@tomwayson
Copy link
Owner

tomwayson commented Jun 15, 2016

Thank you @lobsteropteryx - this is awesome. Really nice to have intellisense for esri modules, and to have webpack for bundling.

One thing I noticed was that the first time I ran it it seemed like the lite-server was kicked off before the webpack build completed and I saw 404s for the bundled .js files in the console. I wonder if the "start" script should be:

    "start": "npm run webpack && concurrently \"npm run webpack:w\" \"npm run lite\" ",

Other than that, I think showing how to use webpack to load and bundle the dependencies is going to be helpful to a lot of developers.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants