Nuxt/test/fixtures/module/modules/basic/index.js
Sébastien Chopin 0183ac4b86 Merge branch 'dev' of github.com:Atinux/nuxt.js into dev
Conflicts:
	lib/build.js
	lib/module.js
	lib/server.js
2017-05-21 19:23:31 +02:00

31 lines
646 B
JavaScript
Executable File

const path = require('path')
module.exports = function basicModule (options, resolve) {
// Add vendor
this.addVendor('lodash')
// Add a plugin
this.addPlugin(path.resolve(__dirname, 'reverse.js'))
// Extend build
this.extendBuild((config, { isClient, isServer }) => {
// Do nothing!
})
// Extend build again
this.extendBuild((config, { isClient, isServer }) => {
// Do nothing!
})
// Extend routes
this.extendRoutes((routes, resolve) => {
// Do nothing!
})
// Require same module twice
this.requireModule('~/modules/empty/index.js')
this.requireModule('~/modules/empty/index.js')
resolve()
}