-
Notifications
You must be signed in to change notification settings - Fork 11
/
snowpack.config.js
45 lines (43 loc) · 1.03 KB
/
snowpack.config.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
const fs = require('fs');
const path = require('path');
const url = require('url');
const isTS = fs.existsSync(url.pathToFileURL(path.join(process.cwd(), 'tsconfig.json')));
/** @type {import("snowpack").SnowpackUserConfig } */
module.exports = {
mount: {
src: '/static',
public: { url: '/', static: true },
},
plugins: [
'@snowpack/plugin-babel',
'@snowpack/plugin-dotenv',
['./tools/glslPlugin.js', {}],
'./tools/cssImportTextPlugin.js',
// [
// '@snowpack/plugin-optimize',
// {
// target: 'es2018',
// },
// ],
],
devOptions: {
out: './docs',
},
packageOptions: {
sourceMap: false,
treeshake: false,
installTypes: isTS,
},
buildOptions: {
baseUrl: '/pixelapp/',
clean: true,
out: './docs'
},
optimize: {
bundle: false,
minify: true,
manifest: true,
preload: true,
target: 'es2018',
},
};