Svelte deploy includes src folder

Hello, i deploy a website with svelte. the publish directory is set to /public, where the usual build output from svelte with rollup goes. however, after deploying the site, a src and a node_modules folder is also deployed in the publish directory, which basically publishes all my source code. after my build script i have a postbuild script listing all current files and folders in the /public folder and at this point in the build progress there is no src or node_modules folder in the /public folder. so i assume they have to be copied by netlify after my build script.

is this a known issue and is there a workaround?

Hi @projectmonopolygo

This is not an issue with Netlify. See Disable webpack production sourcemaps · Issue #2005 · facebook/create-react-app · GitHub for a discussion on this topic. As per source maps enabled for build · Issue #6787 · facebook/create-react-app · GitHub the workaround is changing the package.json build script

"build": "GENERATE_SOURCEMAP=false react-scripts build"

@coelmay thanks for the hint. Setting the sourcemap option in the rollup.config.js to false instead of !production did the trick for me