这是indexloc提供的服务,不要输入任何密码
Skip to content

bundle: false rewrites "with { type: 'json' }" to deprecated "assert { type: 'json' }" #1374

@monolithed

Description

@monolithed
import {defineConfig} from 'tsup';

const config = defineConfig({
    entry: [
        'src/**/*.{js,cjs,mjs,ts,mts,json}'
    ],

    platform: 'node',
    // target: 'esnext',
    outDir: './dist',
    clean: true,
    dts: true,
    format: 'esm',
    treeshake: true,
    splitting: true,
    bundle: false
});

export default config;
import data from '#foo/file.json' with {type: 'json'};

is being replaced with the deprecated syntax:

import data from '#foo/file.json' assert {type: 'json'};
                                   ^ SyntaxError: Unexpected identifier 'assert'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions