Replies: 5 comments 1 reply
|
Did you tried adding this via |
0 replies
|
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? |
0 replies
|
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 |
0 replies
|
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 |
0 replies
// preact.config.js
module.exports = function (config, env) {
config.resolve.alias.src = env.src;
};this worked for me. |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
All reactions