Skip to content

Can't resolve path when importing on esbuild.ts #3

@panus2544

Description

@panus2544

I followed the usage guide:

; (async function () {
  const entryPoints = await glob('src/**/*.ts')

  build({
    entryPoints,
    logLevel: 'info',
    outdir: 'build',
    // bundle: true,
    // minify: true,
    platform: 'node',
    format: 'cjs',
    sourcemap: true,
    plugins: [
      aliasPlugin({
        // must be absolute path
        '@': path.resolve(__dirname, "./src")
      })
      // esbuildPluginFastifySwaggerUi(),
      // esbuildPluginPino({ transports: ['pino-pretty'] }),
    ],
  });
})()

But I still get an error when importing from a build js file

image

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