Skip to content

watch doesn't update TS files when check: false or within Vue files #433

@mav-rik

Description

@mav-rik

What happens and why it is incorrect

When running rollup.watch (programmatically) only the first build goes well. All the following builds result in the same output for .ts files. I've added a .js file and only that .js file gets changes on every re-build. None of the .ts files get an update after re-build.

Same for .vue files. When using <script setup lang="ts"> - it doesn't get updates after re-builds. When using <script setup> - works fine. But I guess there is a single cause for both.

Yes I pass clean: true option.

Environment

WSL 2

Versions

rollup-plugin-typescript2 v0.34.1

  System:
    OS: Linux 5.10 Ubuntu 20.04 LTS (Focal Fossa)
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1265U
    Memory: 15.76 GB / 24.62 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 18.12.1 - /usr/local/bin/node
    npm: 8.19.2 - /usr/local/bin/npm
  npmPackages:
    rollup: ^3.10.0 => 3.10.0 

rollup.config.js

:
    "plugins": [
        {
            "name": "virtual"
        },
        {
            "name": "node-resolve",
            "version": "15.0.1",
            "resolveId": {
                "order": "post"
            }
        },
        {
            "name": "rpt2"
        },
        {
            "name": "vue"
        },
        {
            "name": "scss"
        }
    ]

plugin output with verbosity 3

:
rpt2: parsed tsconfig: {
    "options": {
        "moduleResolution": 2,
        "esModuleInterop": true,
        "target": 2,
        "module": 99,
        "lib": [
            "lib.esnext.d.ts",
            "lib.dom.d.ts",
            "lib.dom.iterable.d.ts"
        ],
        "noUnusedLocals": true,
        "declaration": false,
        "resolveJsonModule": true,
        "downlevelIteration": true,
        "forceConsistentCasingInFileNames": true,
        "strict": true,
        "noImplicitAny": false,
        "skipLibCheck": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": false,
        "configFilePath": ".../tsconfig.json",
        "noEmitHelpers": false,
        "importHelpers": true,
        "noResolve": false,
        "noEmit": false,
        "noEmitOnError": false,
        "inlineSourceMap": false,
        "allowNonTsExtensions": true
    },

rpt2: typescript version: 4.9.4
rpt2: tslib version: 2.4.1
rpt2: rollup version: 3.10.0
rpt2: rollup-plugin-typescript2 version: 0.34.1
rpt2: plugin options:
{
    "check": false,
    "verbosity": 3,
    "clean": true,
    "cacheRoot": ".../node_modules/.cache/rollup-plugin-typescript2",
    "include": [
        "*.ts+(|x)",
        "**/*.ts+(|x)"
    ],
    "exclude": [
        "*.d.ts",
        "**/*.d.ts"
    ],
    "abortOnError": true,
    "rollupCommonJSResolveHack": false,
    "useTsconfigDeclarationDir": false,
    "tsconfigOverride": {
        "compilerOptions": {
            "noImplicitAny": false,
            "noUnusedLocals": true,
            "declaration": false
        }
    },
    "transformers": [],
    "tsconfigDefaults": {},
    "objectHashIgnoreUnknownHack": false,
    "cwd": "...",
    "typescript": "version 4.9.4"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind: bugSomething isn't working properlyproblem: removed issue templateOP removed the issue template without good causescope: integrationRelated to an integration, not necessarily to core (but could influence core)scope: vueRelated to integration with Vue (rollup-plugin-vue is long archived), not corescope: watch modeRelated to Rollup's watch modesolution: workaround availableThere is a workaround available for this issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions