Skip to content

Commit

Permalink
Fix sourcemaps not working (#43)
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
  • Loading branch information
marvinhagemeister and developit authored Jul 4, 2020
1 parent 40b2471 commit d5cc345
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/configure.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,12 +282,12 @@ export default function configure(options) {
),

preprocessors: {
[rootFiles + '/**/*']: ['webpack'],
[rootFiles]: ['webpack'],
[rootFiles + '/**/*']: ['webpack', 'sourcemap'],
[rootFiles]: ['webpack', 'sourcemap'],
},

webpack: {
devtool: 'cheap-module-eval-source-map',
devtool: 'inline-source-map',
// devtool: 'module-source-map',
mode: webpackConfig.mode || 'development',
module: {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function cleanStack(str, cwd = process.cwd()) {

let clean = str.replace(
new RegExp(
`( |\\()(https?:\\/\\/localhost:\\d+\\/base\\/|${cwd.replace(
`( |\\()(https?:\\/\\/localhost:\\d+\\/base\\/|webpack:///|${cwd.replace(
/([\\/[\]()*+$!^.,?])/g,
'\\$1'
)}\\/*)?([^\\s():?]*?)(?:\\?[a-zA-Z0-9]+?)?(:\\d+(?::\\d+)?)`,
Expand Down

0 comments on commit d5cc345

Please sign in to comment.