Replies: 5 comments 1 reply
-
Did you tried adding this via |
Beta Was this translation helpful? Give feedback.
-
Thanks @prateekbh, config.resolve.modules.push(env.src) And setting baseUrl in tsconfig.json fixed the vscode's module not found issue Are there any plans to make support for this by default? |
Beta Was this translation helpful? Give feedback.
-
Still getting the error in fresh
// <projectRoot>/preact.config.js
export default (config, env, helpers) => {
config.resolve.modules.push(env.src);
}; // <projectRoot>/src/components/app.js
// ...
// Code-splitting is automated for routes
import Home from 'src/routes/home'; // '../../src/routes/home'
// ... What am I missing? edit: found it! import Home from 'src/routes/home'; // wrong
import Home from 'routes/home'; // right |
Beta Was this translation helpful? Give feedback.
-
Sorry if this isn't the right spot but I feel like this is also affecting how my imports are working with TypeScript. After adding
|
Beta Was this translation helpful? Give feedback.
-
// preact.config.js
module.exports = function (config, env) {
config.resolve.alias.src = env.src;
}; this worked for me. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Do you want to request a feature or report a bug?
feature
Build failed!
✖ ERROR ./index.ts
✖ ERROR BabelEsmPlugin: ./index.ts
what is motivation or use case for changing the behaviour?
create-react-app has this functionality
Please mention other relevant information.
I tried setting tsconfig.json/baseUrl to
"./src/"
I also tried this:
Beta Was this translation helpful? Give feedback.
All reactions