-
I am using the latest preact, but it looks like a webpack issue to me. Let's say my folder structure is:
where app/app.js import { foo } from './foo'
import { baz } from '../bar/baz'
... app/foo/index.js const foo = () => { ... }
export { foo } bar/baz/index.js const baz = () => { ... }
export { baz } It fails to bundle with a warning "export 'baz' was not found in ../bar/baz But, if I make it a default export like bar/baz/index.js const baz = () => { ... }
export default baz and update app.js to app/app.js import { foo } from './foo'
import baz from '../bar/baz'
... everything works fine Just wondering how is it possible that "local" directory reference resolves fine, but level up - can't be resolved in a list export. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
If I remember correctly there are differences in import behavior depending if you are importing a route or a component. But I could completely mislead you as I haven't played with Preact in a few months. |
Beta Was this translation helpful? Give feedback.
If I remember correctly there are differences in import behavior depending if you are importing a route or a component. But I could completely mislead you as I haven't played with Preact in a few months.