diff --git a/package.json b/package.json index a3b96644..747b92b2 100644 --- a/package.json +++ b/package.json @@ -31,8 +31,8 @@ ] }, "files": [ - "dist/", - "README.md" + "src/", + "dist/" ], "pre-commit": "lint:staged", "jest": { diff --git a/webpack.prod.js b/webpack.prod.js index db665304..f6c7bbde 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -46,10 +46,15 @@ module.exports = merge.smart(require('./webpack.base.js'), { new webpack.SourceMapDevToolPlugin({ // asset matching test: /\.js?$/, - exclude: /node_modules/, // file and reference filename: '[file].map', + + // don't include source file content, since we link to the actual file + noSources: true, + + // sourcemap is in 'dist', webpack context is in 'src' + moduleFilenameTemplate: info => path.posix.normalize(`../src/${info.resourcePath}`), }), ], });