Skip to content

Add a ~ import alias for the frontend root

Erwan Rouchet requested to merge import-alias into master

Use a Webpack import alias to the frontend root:

// vue/Element/Classifications/Classification.vue

// before
import { CLASSIFICATION_STATES } from '../../../js/config'

// after
import { CLASSIFICATION_STATES } from '~/js/config'

This makes writing imports easier since you no longer have to think about where you are in the directory tree, and reduces the hassle of moving files around during refactorings.

Merge request reports

Loading