-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsnowpack.config.mjs
47 lines (45 loc) · 1.18 KB
/
snowpack.config.mjs
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
/** @type {import("snowpack").SnowpackUserConfig } */
const config = {
mount: {
public: { url: '/', static: true },
src: { url: '/dist' },
},
alias: {
Components: './src/components',
Functions: './src/functions',
'#': './src/',
},
plugins: [
'@snowpack/plugin-react-refresh',
'@snowpack/plugin-dotenv',
[
'@snowpack/plugin-typescript',
{
/* Yarn PnP workaround: see https://www.npmjs.com/package/@snowpack/plugin-typescript */
...(process.versions.pnp ? { tsc: 'yarn pnpify tsc' } : {}),
},
],
],
routes: [
/* Enable an SPA Fallback in development: */
// {"match": "routes", "src": ".*", "dest": "/index.html"},
],
optimize: {
/* Example: Bundle your final build: */
// "bundle": true,
},
packageOptions: {
knownEntrypoints: ['framer-motion-carousel', 'framesync', 'style-value-types', 'popmotion', 'framer-motion']
/* ... */
},
devOptions: {
/* ... */
},
buildOptions: {
/* ... */
jsxInject: '' +
`const PUBLIC_URL = path => (import.meta.env.SNOWPACK_PUBLIC_API_URL ?? '/') + path\n` +
`import React, { Fragment } from 'react'`
},
};
export default config;