mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
chore(builder): better naming for plugin generated aliases
Help developers tracing exact source of warns/errors
This commit is contained in:
parent
80fb65040b
commit
1eee113d6d
@ -10,8 +10,11 @@ import Nuxt from './components/nuxt.js'
|
||||
import App from '<%= appPath %>'
|
||||
import { setContext, getLocation } from './utils'
|
||||
<% if (store) { %>import { createStore } from './store.js'<% } %>
|
||||
<% plugins.forEach(plugin => { %>import <%= plugin.name %> from '<%= plugin.name %>'
|
||||
<% }) %>
|
||||
|
||||
/* Plugins */
|
||||
|
||||
<% plugins.forEach(plugin => { %>// <%= plugin.src %><%= (plugin.ssr===false) ? ' (Only included in client bundle)' : '' %>
|
||||
import <%= plugin.name %> from '<%= plugin.name %>'<% }) %>
|
||||
|
||||
// Component: <no-ssr>
|
||||
Vue.component(NoSSR.name, NoSSR)
|
||||
|
@ -63,7 +63,7 @@ export default class Builder {
|
||||
return {
|
||||
src: this.nuxt.resolvePath(p.src),
|
||||
ssr: (p.ssr !== false),
|
||||
name: basename(p.src, extname(p.src)).replace(/[^a-zA-Z?\d\s:]/g, '') + '_' + hash(p.src)
|
||||
name: basename(p.src, extname(p.src)).replace(/[^a-zA-Z?\d\s:]/g, '') + '_plugin_' + hash(p.src)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user