-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
30 lines (28 loc) · 887 Bytes
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* sample config */
const path = require('path');
function aliasEmberDirs(appAlias) {
const emberDirs = [
'/application', '/array', '/component', '/object',
'/polyfills', '/service', '/routing', '/utils', ''
];
const emberBaseDir = 'node_modules/intellij-emberjs-import-support/@ember';
return emberDirs.reduce(function(result, dir) {
result[`@ember${dir}`] = emberBaseDir + dir;
return result;
}, appAlias);
}
module.exports = {
resolve: {
modules: [
path.join(__dirname, 'node_modules/intellij-emberjs-import-support/@ember-packages'),
'node_modules',
],
root: path.resolve(__dirname),
alias: aliasEmberDirs({
'src': 'app'
// your application alias folders
// for example: 'src': 'app', will allow you to `import { foo } from 'src/bar';`
// where 'src/bar' is located in `app/bar` folder.
})
}
};