-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathstencil.config.ts
49 lines (47 loc) · 1.24 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
47
48
49
import { Config } from '@stencil/core';
import { sass } from '@stencil/sass';
import nodeSassPackageImporter from 'node-sass-package-importer';
// https://stenciljs.com/docs/config
export const config: Config = {
namespace: 'code-challenge',
hashFileNames: false,
globalScript: 'src/global/app.ts',
globalStyle: 'src/global/app.scss',
testing: {
// moduleFileExtensions: ['js', 'jsx', 'json', 'png', 'md', 'html', 'ts', 'tsx'],
moduleNameMapper: {
'\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|md)$':
'<rootDir>/testing/mocks/file-mock.js',
'\\.(css|sass)$': '<rootDir>/testing/mocks/style-mock.js',
},
},
outputTargets: [
{
type: 'dist',
esmLoaderPath: '../loader',
},
{
type: 'dist-custom-elements-bundle',
},
{
type: 'docs-readme',
footer: '<style>.sbdocs-h1{display: none;}</style>',
},
],
buildEs5: 'prod',
// Opt-in for IE11, Edge 16-18 and Safari 10 Builds
extras: {
cssVarsShim: true,
dynamicImportShim: true,
safari10: true,
shadowDomShim: true,
},
plugins: [
sass({
importer: nodeSassPackageImporter(),
injectGlobalPaths: [
'src/global/app.scss',
],
}),
],
};