Skip to content

Does not respect default language in svelte.config.js #593

@TheComputerM

Description

@TheComputerM

Describe the bug
My svelte.config.js file looks like this:

import sveltePreprocess from "svelte-preprocess";

module.exports = {
  preprocess: sveltePreprocess({
    defaults: {
      script: "typescript",
      style: "scss",
    },
    postcss: {
      plugins: [require("autoprefixer")()],
    },
  }),
};

Expected behavior
It is showing me that you have to add lang='ts' to svelte file that looks something like this:

<script>
  export let segment: string;
</script>

{segment}

Screenshots
image

System (please complete the following information):

  • OS: Windows
  • IDE: VSCode
  • Plugin/Package: Svelte for VSCode

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions