Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(language-core): experimental resolve external stylesheets #5136

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

KazariEX
Copy link
Collaborator

@KazariEX KazariEX commented Jan 20, 2025

resolve #3505, resolve #3720

Introduce experimentalResolveExternalStylesheets option. It is effective for both <style src="..."> and @import "...".

Before turn on this option, you should create a stub declaration to avoid type break caused by invalid import statements:

declare module '*.css' {
  const classes: Record<string, string>;
  export default classes;
}

Then you can install a typescript plugin that provides the type support for .css files, such as https://github.com/mrmckeb/typescript-plugin-css-modules.

@KazariEX KazariEX changed the title feat: experimental resolve external stylesheets feat(language-core): experimental resolve external stylesheets Jan 20, 2025
Copy link

pkg-pr-new bot commented Jan 20, 2025

Open in Stackblitz

vue-component-meta

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-meta@5136

@vue/language-core

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-core@5136

vue-component-type-helpers

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@5136

@vue/language-plugin-pug

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@5136

@vue/language-server

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-server@5136

@vue/language-service

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-service@5136

vue-tsc

npm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@5136

@vue/typescript-plugin

npm i https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@5136

commit: 45ec9ed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: CSS @import statements intellisense vue style module does not prompt
1 participant