Skip to content
This repository was archived by the owner on Nov 8, 2021. It is now read-only.
This repository was archived by the owner on Nov 8, 2021. It is now read-only.

tsconfig.json error for babel config file #36

@IlCallo

Description

@IlCallo

An error is reported at tsconfig.json about babel.config.js being overwritten after build or something like that.

This answer explain it's cause, while this reflect our current scenario: it's Quasar app who decide to generate into dist folder, but TS extension doesn't know about this (because it's probably managed at a lower level via Webpack) and complains.

It can be fixed by changing options like this:

{
  "compilerOptions": {
    "allowJs": true,
    "sourceMap": true,
    "target": "es6",
    "strict": true,
    "experimentalDecorators": true,
    "module": "esnext",
    "moduleResolution": "node",
    "baseUrl": ".",
    "outDir": "./dist" // <- Add this
  },
  "exclude": ["node_modules", "dist"] // <- Add "dist" to "exclude" array
}

EDIT
or (preferred, if you are not using this configuration also to directly compile files) like this

{
  "compilerOptions": {
    "allowJs": true,
    "sourceMap": true,
    "target": "es6",
    "strict": true,
    "experimentalDecorators": true,
    "module": "esnext",
    "moduleResolution": "node",
    "baseUrl": ".",
    "noEmit": true // <- Add this
  },
  "exclude": ["node_modules"]
}

Output is managed by Webpack, so we don't really need TypeScript to emit any file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions