Skip to content

Commit

Permalink
chore(vite): Normalize SCSS node_modules imports
Browse files Browse the repository at this point in the history
After forwarding `DragDrop.scss`, we need to instruct `vite` to import
files starting with `~` from the `node_modules` folder.

This commit normalizes the required configuration to do so.

Comes from: #1927
Relates: https://github.com/KaotoIO/kaoto/pull/1927/files#r1924952467
  • Loading branch information
lordrip committed Jan 22, 2025
1 parent 496414e commit 5eb229d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/ui-tests/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { StorybookConfig } from '@storybook/react-vite';

import { dirname, join, resolve } from 'path';
import { dirname, join } from 'path';
import packageJson from '../../../package.json';

/**
Expand Down
4 changes: 1 addition & 3 deletions packages/ui/src/components/DataMapper/debug/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ export default defineConfig(async () => {
alias: [
{
find: /^~.+/,
replacement: (val) => {
return val.replace(/^~/, '');
},
replacement: '$1',
},
],
},
Expand Down
4 changes: 1 addition & 3 deletions packages/ui/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ export default defineConfig(async () => {
alias: [
{
find: /^~.+/,
replacement: (val) => {
return val.replace(/^~/, '');
},
replacement: '$1',
},
],
},
Expand Down

0 comments on commit 5eb229d

Please sign in to comment.