forked from GrygrFlzr/are-we-there-yet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnowpack.config.cjs
53 lines (50 loc) · 1.36 KB
/
snowpack.config.cjs
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
// https://github.com/svelte-add/tailwindcss/issues/7
const path = require('path');
const pkg = require(path.join(process.cwd(), 'package.json'));
// Consult https://www.snowpack.dev to learn about these options
module.exports = {
packageOptions: {
// always include Svelte in your project
knownEntrypoints: ['svelte'],
// ignore `import fs from 'fs'` etc
external: [
...require('module').builtinModules,
...Object.keys(pkg.dependencies || {}),
],
},
plugins: [
[
'@snowpack/plugin-svelte',
{
compilerOptions: {
hydratable: true,
},
configFilePath: 'svelte.config.cjs',
},
],
[
'@snowpack/plugin-build-script',
{
cmd: 'postcss',
input: ['.css', '.pcss'],
output: ['.css'],
},
],
'@snowpack/plugin-typescript',
],
devOptions: {
open: 'none',
output: 'stream',
},
buildOptions: {
sourcemap: true,
},
mount: {
'.svelte/assets': `/${process.env.SVELTE_KIT_APP_DIR}/assets`,
'src/components': '/_components',
},
alias: {
$app: './.svelte/assets/runtime/app',
$components: './src/components',
},
};