79742465

Date: 2025-08-21 14:58:07
Score: 1
Natty:
Report link

I had a similar problem, except on a framework.

In my case worked for both commands

    npm run dev
    npm run build

I've tried to mirror my solution

=== src/index.js ===

    // file looks fine

    import "./styles/index.scss"

=== src/styles/index.scss ===

    .search-input {
        width: 100%;
        background-image: url("@iconsAlias/search.svg");
    }

=== vite.config.js ===

    import { defineConfig } from 'vite';
    import path from 'path';

    export default defineConfig({

        resolve: {

            alias: {

                '@iconsAlias': path.resolve(__dirname, 'src/assets/icons')

            }

        },

    });
Reasons:
  • Contains signature (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Cas