Skip to content

Make ['style'] resolve condition optional in vite-plugin-angular #2381

Description

@mrginglymus

Please provide the environment you discovered this bug in.

#141

Which area/package is the issue in?

vite-plugin-angular

Description

#141 added the custom condition style to resolve.condition with no way to override:

resolve: {
conditions: ['style'],
},

However, I have a package.json that contains export definitions like this:

 "./stylesheets/*": {
      "style": "./dist/*/stylesheet.css",
      "types": "./dist/*/stylesheet.d.ts",
      "default": "./dist/*/stylesheet.js"
    },

As I'm using css modules, I want the js import when importing from js, which #141 prevents.

Please provide the exception or error you saw


Other information

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.0bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions