Skip to content

Alias '~' on 'node_modules' not working #93

@tlyau62

Description

@tlyau62

May I ask is there any way to reference ~ to node_modules?

I have tried "@rollup/plugin-alias"

alias({
      entries: {
        "~": path.join(__dirname, "node_modules/"),
      },
 })

with includePaths: ["node_modules"], but it seems not working.

The error is this.

Error:
        Can't find stylesheet to import.
  ╷
2 │ @import "~bootstrap/scss/functions";
  │         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  ╵
  stdin 2:9  root stylesheet

Thanks for the help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions