What does the bug relate to?
Describe the bug
Hi there,
I have the following files in the project in ./src/utils:
function util1() { /* .... */}
export default util1;
function util2() { /* .... */}
export default util2;
export {default as util1} from './util1';
export {default as util2} from './util2';
Then it's imported with import {util1} from 'utils'; in other files.
I've tried this config -
EntryShakingPlugin({
targets: [
{
glob: 'src/utils/*.ts',
}
],
}),
But I got an error Uncaught SyntaxError: The requested module '/src/utils/index.ts' does not provide an export named 'util1'. And it really doesn't provide util1 because index.ts is empty.
To Reproduce
What am I doing wrong? Is it possible to use this plugin on my file/import/export file structure?
Vite version
5.4.11
Additional context
No response
What does the bug relate to?
Describe the bug
Hi there,
I have the following files in the project in
./src/utils:Then it's imported with
import {util1} from 'utils';in other files.I've tried this config -
But I got an error
Uncaught SyntaxError: The requested module '/src/utils/index.ts' does not provide an export named 'util1'. And it really doesn't provideutil1because index.ts is empty.To Reproduce
What am I doing wrong? Is it possible to use this plugin on my file/import/export file structure?
Vite version
5.4.11
Additional context
No response