diff --git a/apps/delivery-options/skip-scss-plugin.ts b/apps/delivery-options/skip-scss-plugin.ts new file mode 100644 index 00000000..8d2b9c50 --- /dev/null +++ b/apps/delivery-options/skip-scss-plugin.ts @@ -0,0 +1,12 @@ +import {type Plugin} from 'vite'; + +export const skipScssPlugin = (): Plugin => ({ + name: 'skip-scss', + transform(_, id) { + if (id.endsWith('.scss')) { + return ''; + } + + return null; + }, +}); diff --git a/apps/delivery-options/vite-myparcel-lib.config.ts b/apps/delivery-options/vite-myparcel-lib.config.ts index 14a42b88..3ee7aecf 100644 --- a/apps/delivery-options/vite-myparcel-lib.config.ts +++ b/apps/delivery-options/vite-myparcel-lib.config.ts @@ -3,6 +3,7 @@ import dts from 'vite-plugin-dts'; import {mergeConfig, type UserConfig} from 'vite'; import {createViteConfig} from '@myparcel-do/build-vite'; import baseConfig from './vite.config'; +import {skipScssPlugin} from './skip-scss-plugin'; import {getSharedConfig, createFilenameFormatter} from './private'; export default createViteConfig((env) => { @@ -10,6 +11,7 @@ export default createViteConfig((env) => { return mergeConfig(baseConfig(env), { plugins: [ + skipScssPlugin(), isProd && dts({ entryRoot: 'src', diff --git a/apps/delivery-options/vite-myparcel.config.ts b/apps/delivery-options/vite-myparcel.config.ts index 076b7d58..e0868577 100644 --- a/apps/delivery-options/vite-myparcel.config.ts +++ b/apps/delivery-options/vite-myparcel.config.ts @@ -1,10 +1,13 @@ import {mergeConfig, type UserConfig} from 'vite'; import {createViteConfig} from '@myparcel-do/build-vite'; import baseConfig from './vite.config'; +import {skipScssPlugin} from './skip-scss-plugin'; import {getSharedConfig, createFilenameFormatter} from './private'; export default createViteConfig((env) => { return mergeConfig(baseConfig(env), { + plugins: [skipScssPlugin()], + build: { emptyOutDir: false, lib: {