-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DevTools failed to load SourceMap with nollup only #9
Comments
Edit: Added reproduction project. |
I have no real idea how sourcemaps works in Nollup (or generally otherwise...), but you can probably fix this by adding a middleware to serve contents from Add a const path = require('path')
const fs = require('fs')
module.exports = {
before(app) {
app.get('/node_modules/*', (req, res, next) => {
const file = path.resolve(__dirname, req.url.replace(/^\//, ''))
fs.exists(file, exists => {
if (exists)res.sendFile(file)
else next()
})
})
}
} |
Wow it works! But I have totally no idea what I'm doing. Does it impact performance in your opinion? Can it affect the final bundle created with |
I was surely tired previously, it's obviously not a sourcemap problem. It's a more of a dev server problem. No it wouldn't impact performance in any meaningful way... Like we're speaking less than a ms or so per request. And it wouldn't end up in prod build. Nollup doesn't do prod build. It doesn't do build at all actually. It just does fast dev server mostly compatible with Rollup config. It is intended that you produce your prod bundle with Rollup. |
I'm trying to use the amazing @urql/svelte.
It works both with nollup and rollup.
But with nollup I have these warnings in console:
Reproduction here: https://github.com/frederikhors/svelte-template-hot/tree/urql-svelte-sourcemap-warnings
Why?
The text was updated successfully, but these errors were encountered: