UNPKG

883 BJavaScriptView Raw
1// @ts-check
2
3const { argv } = process
4const build = process.env['NODE_ENV'] === 'build' || argv[argv.length - 1] === 'build'
5const { join } = require('path')
6
7/**
8 * @type {import('./index').F2EConfig}
9 */
10const config = {
11 livereload: !build,
12 build,
13 gzip: true,
14 useLess: true,
15 middlewares: [
16 { middleware: 'template', test: /\.html?/ },
17 // () => {
18 // return {
19 // onRoute: p => {
20 // if (!p) return 'index.html'
21 // },
22 // }
23 // }
24 ],
25 output: join(__dirname, './output'),
26 // onServerCreate: (server) => {
27 // const { Server } = require('ws')
28 // const wss = new Server({server});
29 // wss.on('connection', (socket) => {
30 // socket.send('init')
31 // })
32 // }
33 authorization: 'admin:admin'
34}
35module.exports = config
\No newline at end of file