-
Notifications
You must be signed in to change notification settings - Fork 13
/
vite.config.ts
34 lines (31 loc) · 1.01 KB
/
vite.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
import { resolve } from 'path';
import postcssLit from 'rollup-plugin-postcss-lit';
import { defineConfig } from 'vite';
import { typescriptTransform } from './tools/vite/index.js';
export default defineConfig({
css: {
preprocessorOptions: {
scss: {
// https://vitejs.dev/config/shared-options#css-preprocessoroptions
// TODO: api: 'modern',
silenceDeprecations: ['legacy-js-api'],
},
},
},
plugins: [
// We apply the postcssLit plugin (which transforms .scss files to Lit
// css tagged templates) as this should apply in almost all cases.
postcssLit({ exclude: ['**/core/styles/**/*', '**/storybook/**/*'] }),
typescriptTransform(),
],
resolve: {
// Alias used for test and storybook environments
alias: [
{ find: '@sbb-esta/lyne-elements', replacement: resolve(__dirname, 'src/elements') },
{
find: '@sbb-esta/lyne-elements-experimental',
replacement: resolve(__dirname, 'src/elements-experimental'),
},
],
},
});