-
Notifications
You must be signed in to change notification settings - Fork 44
/
Copy pathpreset.js
63 lines (61 loc) · 1.78 KB
/
preset.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
'use strict';
const { join } = require('path');
module.exports = {
browsers: ['defaults'],
node: 'current',
basePath: '',
assetPath: '<basePath>',
buildDir: '<distDir>',
serverDir: join('<rootDir>', 'node_modules', '.cache', 'hops-webpack'),
serverFile: 'server.js',
statsFile: 'stats.json',
mixins: [
join(__dirname, 'mixins', 'build'),
join(__dirname, 'mixins', 'config'),
join(__dirname, 'mixins', 'develop'),
join(__dirname, 'mixins', 'render'),
join(__dirname, 'mixins', 'start'),
join(__dirname, 'mixins', 'stats'),
join(__dirname, 'mixins', 'esbuild'),
join(__dirname, 'mixins', 'optimizations'),
],
mixinTypes: {
browser: {
mainFiles: ['mixin.browser', 'mixin.runtime', 'mixin'],
mainFields: ['mixin:browser', 'mixin:runtime', 'mixin'],
},
server: {
mainFiles: ['mixin.server', 'mixin.runtime', 'mixin'],
mainFields: ['mixin:server', 'mixin:runtime', 'mixin'],
},
},
browserWhitelist: {
basePath: true,
},
configSchema: {
browserWhitelist: {
type: 'object',
additionalProperties: { type: 'boolean' },
},
browsers: {
type: 'array',
items: { type: 'string', minLength: 1 },
},
experimental: {
type: 'object',
properties: {
babelIncludePatterns: {
type: 'array',
items: { type: 'string', minLength: 1 },
},
},
},
node: { type: 'string', minLength: 1 },
basePath: { type: 'string' },
assetPath: { type: 'string' },
buildDir: { type: 'string', minLength: 1, absolutePath: true },
serverDir: { type: 'string', minLength: 1, absolutePath: true },
serverFile: { type: 'string', minLength: 1, absolutePath: false },
statsFile: { type: 'string', minLength: 1, absolutePath: false },
},
};