This package will fix unresolved Ember.js imports like
import from '@ember/..'
for JetBrains IDEs (Idea, WebStorm, ...)
Installation
In your project folder invoke:
-
npm i intellij-emberjs-import-support
Note: Please do not specify--save-dev
during npm install - it will lead to Ember.js error:
Theintellij-emberjs-import-support
addon could not be found at../node_modules/intellij-emberjs-import-support
. -
in the project's root create
webpack.config.js
file with the following content:
/* eslint-disable */const path = ; { const emberDirs = '/application' '/array' '/component' '/controller' '/object' '/polyfills' '/service' '/routing' '/runloop' '/utils' '' ; const emberBaseDir = 'node_modules/intellij-emberjs-import-support/@ember'; return emberDirs;} moduleexports = resolve: modules: path 'node_modules' root: path alias: ;
- Turn On Webpack support in JetBrains IDE:
Preferences | Languages & Frameworks | JavaScript | Webpack
and set the config file towebpack.config.js
which was just created.
That's it.
import { .. } from '@ember/..'
should be resolved by IDE now.
Improvements
This package is not ready yet, so any help is appreciated.
Feel free to create a Pull Requests with improvements / fixes.
Licenses
This package is licensed under MIT. Copyright (c) 2019 Dmitriy Labuzov.
It also contains /@ember-packages subfolder from Ember.js (https://github.com/emberjs/ember.js/) Which is also licensed under MIT. Copyright (c) 2018 Yehuda Katz, Tom Dale and Ember.js contributors