-
Notifications
You must be signed in to change notification settings - Fork 13
/
vite.config.ts
35 lines (32 loc) · 1.04 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
35
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',
api: 'legacy',
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'),
},
],
},
});