Add ~ alias

This commit is contained in:
Sébastien Chopin 2016-11-25 15:36:45 +01:00
parent cb3bf4c320
commit 8ae76db287

View File

@ -26,6 +26,7 @@ module.exports = function () {
resolve: { resolve: {
// Disable for now // Disable for now
alias: { alias: {
'~': join(this.dir),
'static': join(this.dir, 'static'), // use in template with <img src="~static/nuxt.png" /> 'static': join(this.dir, 'static'), // use in template with <img src="~static/nuxt.png" />
'~static': join(this.dir, 'static'), '~static': join(this.dir, 'static'),
'assets': join(this.dir, 'assets'), // use in template with <img src="~static/nuxt.png" /> 'assets': join(this.dir, 'assets'), // use in template with <img src="~static/nuxt.png" />