-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstencil.config.ts
46 lines (42 loc) · 1.4 KB
/
stencil.config.ts
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
import replace from "@rollup/plugin-replace";
import sourcemaps from "rollup-plugin-sourcemaps";
import { Config } from "@stencil/core";
import { sass } from "@stencil/sass";
require("dotenv").config();
// https://stenciljs.com/docs/config
export const config: Config = {
globalStyle: "styles/main.scss",
globalScript: "src/app.ts",
taskQueue: "async",
plugins: [
sourcemaps(),
replace({
exclude: "node_modules/**",
values: {
"process.env.STRIPE_PUBLIC_KEY": process.env.STRIPE_PUBLIC_KEY ? `"${process.env.STRIPE_PUBLIC_KEY}"` : "process.env.STRIPE_PUBLIC_KEY",
"process.env.PIZZA_BASE_DOMAIN": process.env.PIZZA_BASE_DOMAIN ? `"${process.env.PIZZA_BASE_DOMAIN}"` : `"https://base-next.polls.pizza"`,
"process.env.BUGSNAG_KEY": process.env.BUGSNAG_KEY ? `"${process.env.BUGSNAG_KEY}"` : `null`,
"process.env.NODE_ENV": process.env.NODE_ENV ? `"${process.env.NODE_ENV}"` : `"dev"`,
},
preventAssignment: false,
}),
sass({
injectGlobalPaths: ["styles/include/vars.scss", "styles/include/mixins.scss"],
}),
],
outputTargets: [
{
type: "www",
baseUrl: process.env.ROOT_URL,
dir: "dist/www",
prerenderConfig: "./prerender.config.ts",
copy: [{ src: "../public", dest: "." }],
},
],
extras: {
cssVarsShim: true,
dynamicImportShim: true,
safari10: true,
shadowDomShim: true,
},
};