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

Using Prettier Service #48

Open
metaskills opened this issue Aug 13, 2023 · 0 comments
Open

Using Prettier Service #48

metaskills opened this issue Aug 13, 2023 · 0 comments

Comments

@metaskills
Copy link

Greetings. Was hoping this work would allow me to have Prettier formatting in my Vue's <script setup> tags. If that is what this service is not supposed to help with, apologies.

I have the volar-service-prettier package installed and my volar.config.js file appears like so:

import { volar } from "volar-service-prettier";
export default {
  services: [
    volar({
      languages: ["html", "javascript"],
    }),
  ],
};

However, I get this output in my VS Code and my package.json type is set to module.

[Warn  - 10:31:39 PM] Error [ERR_REQUIRE_ESM]: require() of ES Module /workspaces/project/volar.config.js from /home/vscode/.vscode-server/extensions/vue.volar-1.8.8/dist/server.js not supported.
Instead change the require of volar.config.js in /home/vscode/.vscode-server/extensions/vue.volar-1.8.8/dist/server.js to a dynamic import() which is available in all CommonJS modules.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant