use module-dir
This commit is contained in:
@ -11,7 +11,7 @@ const Lws = require('lws')
|
||||
class LocalWebServer extends Lws {
|
||||
constructor (options) {
|
||||
const path = require('path')
|
||||
const stack = [
|
||||
let stack = [
|
||||
'lws-log',
|
||||
'lws-cors',
|
||||
'lws-json',
|
||||
@ -25,10 +25,9 @@ class LocalWebServer extends Lws {
|
||||
'lws-spa',
|
||||
'lws-static',
|
||||
'lws-index'
|
||||
].map(name => {
|
||||
return path.resolve(__dirname, `../node_modules/${name}`)
|
||||
})
|
||||
options = Object.assign({ stack }, options)
|
||||
]
|
||||
const moduleDir = path.resolve(__dirname, `../node_modules`)
|
||||
options = Object.assign({ stack, 'module-dir': moduleDir, prefix: 'lws-' }, options)
|
||||
super(options)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user