Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charlesdemers/ember-cli-webpack-imports
An addon to add Webpack dependencies to your Ember app
https://github.com/charlesdemers/ember-cli-webpack-imports
ember ember-addon webpack
Last synced: 3 months ago
JSON representation
An addon to add Webpack dependencies to your Ember app
- Host: GitHub
- URL: https://github.com/charlesdemers/ember-cli-webpack-imports
- Owner: charlesdemers
- License: mit
- Created: 2017-12-21T16:45:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-22T15:42:02.000Z (about 7 years ago)
- Last Synced: 2024-10-07T19:22:43.120Z (4 months ago)
- Topics: ember, ember-addon, webpack
- Language: JavaScript
- Size: 76.2 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# ember-cli-webpack-imports
An addon to add Webpack dependencies to your Ember app.
## Installation
```shell
ember install ember-cli-webpack-imports
```## Usage
Add the npm modules you’d like to import to `ember-cli-build.js`:
```js
let app = new EmberApp(defaults, {
'ember-cli-webpack-imports': {
expose: [
'graphql-tag',
'apollo-client',
'apollo-link-http',
'apollo-cache-inmemory'
]
}
});
```After that, you can import these modules like any other:
```js
import gql from 'graphql-tag';
import {ApolloClient} from 'apollo-client';
import {HttpLink} from 'apollo-link-http';
import {InMemoryCache} from 'apollo-cache-inmemory';
```## Credits
The great majority of this addon is stolen from the `ember-apollo-client` addon. I simply felt like this code would benefit from being extracted, all props goes to the original authors!