-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy path.f2econfig.js
43 lines (41 loc) · 1.12 KB
/
.f2econfig.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// @ts-check
const { argv } = process
const build = process.env['NODE_ENV'] === 'build' || argv[argv.length - 1] === 'build'
const { join } = require('path')
/**
* @type {import('./index').F2EConfig}
*/
const config = {
livereload: !build,
build,
// app: 'static',
// __withlog__: true,
gzip: true,
// compressors: ['br', 'gzip', 'deflate'],
useLess: false,
shouldUseMinify: (pathname) => {
// 使用include压缩,无需处理
return pathname != 'test/libs.js'
},
middlewares: [
// { middleware: 'template', test: /\.html?/ },
// () => {
// return {
// onRoute: p => {
// if (!p) return 'index.html'
// },
// }
// }
],
// try_files: 'index.html',
output: join(__dirname, './output'),
// onServerCreate: (server) => {
// const { Server } = require('ws')
// const wss = new Server({server});
// wss.on('connection', (socket) => {
// socket.send('init')
// })
// }
// authorization: 'admin:admin'
}
module.exports = config