favware / esbuild-plugin-file-path-extensions

An esbuild plugin to automatically insert file extensions in your built JavaScript files based on the specified target
MIT License
21 stars 2 forks source link

bug: NPM Packages get extension #47

Closed flyfishwv closed 1 year ago

flyfishwv commented 1 year ago

Is there an existing issue for this?

Description of the bug

node_module package imports get the extension added to them.

Steps To Reproduce

Import a common NPM package like axios

import axios from 'axios';

The output after running the build includes the file extension

import axios from 'axios.mjs';

Expected behavior

The import should NOT have the extension added.

import axios from 'axios';

Screenshots

image

Additional context

favna commented 1 year ago

Duplicate of #6