UNPKG

971 BJavaScriptView Raw
1const { REPLACEMENTS } = require('@leanup/stack/lib/replacements');
2
3// https://www.snowpack.dev/reference/configuration
4module.exports = {
5 mount: {
6 public: '/',
7 src: '/',
8 },
9 plugins: [
10 [
11 'snowpack-plugin-replace',
12 {
13 list: REPLACEMENTS,
14 },
15 ],
16 [
17 'snowpack-plugin-less',
18 {
19 javascriptEnabled: true,
20 paths: ['node_modules'],
21 },
22 ],
23 [
24 '@snowpack/plugin-sass',
25 {
26 compilerOptions: {
27 loadPath: ['node_modules'],
28 },
29 },
30 ],
31 '@snowpack/plugin-postcss',
32 ],
33 buildOptions: {
34 out: 'dist',
35 },
36 // https://www.snowpack.dev/guides/optimize-and-bundle#option-2%3A-optimize-plugins
37 optimize: {
38 // entrypoints: 'auto',
39 // preload: true,
40 // bundle: true, // https://github.com/snowpackjs/snowpack/discussions/2520
41 splitting: true,
42 treeshake: true,
43 manifest: true,
44 minify: true,
45 target: 'es2018',
46 },
47};