Skip to content

A warning occurred at build time #16

@jinchaofs

Description

@jinchaofs

code

import path from 'path';
import { esbuildDecorators } from '@anatine/esbuild-decorators';
import { build } from "esbuild"
build({
    entryPoints: [path.resolve('src/server/main.ts')],
    bundle: true,
    outfile: 'out.js',
    platform: 'node',
    target: 'node14',
    bundle: true,
    sourcemap: 'external',
    plugins: [
        esbuildDecorators({
            tsconfigPath: path.resolve('tsconfig.server.json'),
            force: true,
        }),
    ],
})
.catch(() => process.exit(1));

warning

▲ [WARNING] Top-level "this" will be replaced with undefined since this file is an ECMAScript module

    src/server/controller/HomeController.ts:1:18:
      1 │ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
        │                   ~~~~
        ╵                   undefined

  This file is considered to be an ECMAScript module because of the "export" keyword here:

    src/server/controller/HomeController.ts:25:0:
      25 │ export { HomeController };~~~~~~

Done in 1.67s.

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