Skip to content

【bug】'use strict' is double emitted #675

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

Closed
redhat opened this issue Jul 22, 2022 · 0 comments
Closed

【bug】'use strict' is double emitted #675

redhat opened this issue Jul 22, 2022 · 0 comments

Comments

@redhat
Copy link

redhat commented Jul 22, 2022

output

"use strict";'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

// src/util.ts
function fun1(boy) {
  console.log("fun1", boy);
}
function fun2() {
  console.log("fun2");
}

exports.fun1 = fun1;
exports.fun2 = fun2;

tsup config

{
  entry: ['src/pages/**/*.ts'],
  splitting: true,
  sourcemap: false,
  clean: true,
  dts: true,
  treeshake: true,
  esbuildOptions(options) {
    options.outbase = 'src'
    options.chunkNames = '[hash]'
  }
}
@egoist egoist closed this as completed in 7000c8b Aug 12, 2022
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