-
Notifications
You must be signed in to change notification settings - Fork 319
next-source-maps only generates server's source map #377
Comments
I'm seeing the same |
I realised that is because the working version of So I had to install it like After that it is working. When are you guys planing to release it ? |
I have next.config.js const withPlugins = require('next-compose-plugins');
const typescript = require('@zeit/next-typescript')
const less = require('@zeit/next-less')
const sourceMaps = require('@zeit/next-source-maps')
module.exports = withPlugins([
[sourceMaps],
[less, {
cssModules: true,
cssLoaderOptions: {
importLoaders: 1,
},
}],
[typescript],
]); No source maps are generated for both server and client code But sources are generated, if I remove this condition in sources of I don't do PR, as, be honest, I don't know what is the impact |
I actually get
|
I have the same problem as @aequasi and I am not able to make this plugin work :/ |
you guys shoud invoke the |
Increase the default node max-old-space-size option
|
|
Using cannary and the problem persists. And didnt worked also, static source maps don't get generated |
@wallynm 0.0.4-canary.1 works for me |
It's not working for me either. I'm doing static export @wallynm did you solve this? |
Nope, didn't solve at all. What i've discovered is the I'm using custom next.js config with NodeJS. I can try to create an test repository if necessary, what's your configuration @WoLfulus? Currently were using 9.0.6, i gonna test 9.0.7 to see if we had some improvement. |
I did manage to get this working, but I have no idea how. Basically what I did was:
But I'm pretty sure it didn't work from the start. Maybe it had something to do with After that I was able to see .map files in dist folder. |
Using I'm currently using this config at export: const withSourceMaps = require("@zeit/next-source-maps")
const configNext = {
...
}
module.exports = withPlugins([
[withSourceMaps],
[withTM, withTranspileModules],
[withBundleAnalyzer, configBundleAnalyzer],
withSass
], configNext) |
@WoLfulus i don't know if it's right but after seeing your updates i've auto-executed Updated config: module.exports = withPlugins([
[withTM, withTranspileModules],
[withBundleAnalyzer, configBundleAnalyzer],
withSass,
withSourceMaps()
], configNext) Before i was exporting without execute |
Yeah, you should execute (in my case I executed it just after the require call. Executing it returns a new function which is meant to be the plugin itself (I had to dig into the code to see what was happening) Glad it worked out ;) |
Upgrading to the 0.0.4 canary and using like: |
why is that ? it's weird! |
I've added
next-source-maps
to my project however it is only generating the map to the server.I could have some help here since I don't know if i'm doing something wrong or if it is a bug on the plugin.
source-maps.js
next.config.js
I'm using
next@7.0.2
If I import the next plugin like the documentation:
const withSourceMaps = require('@zeit/next-source-maps')()
I get an error saying that
withSourceMaps
is not a function.So I have to import without the function call and this is the result:
Static files
Server files
The text was updated successfully, but these errors were encountered: