Unverified Commit 6ea265f4 authored by Hendrik Liebau's avatar Hendrik Liebau Committed by GitHub

Fix source map loading failure for `path-to-regexp` (#66242)

parent 20224393
...@@ -26,6 +26,13 @@ module.exports = function (task) { ...@@ -26,6 +26,13 @@ module.exports = function (task) {
}) })
} }
if (stats.hasWarnings()) {
this.emit('plugin_warning', {
plugin: 'taskfile-webpack',
warning: `webpack compiled ${options.name} with warnings:\n${stats.toString('errors-warnings')}`,
})
}
if (process.env.ANALYZE_STATS) { if (process.env.ANALYZE_STATS) {
require('fs').writeFileSync( require('fs').writeFileSync(
require('path').join(__dirname, options.name + '-stats.json'), require('path').join(__dirname, options.name + '-stats.json'),
......
...@@ -2120,7 +2120,12 @@ export async function ncc_ws(task, opts) { ...@@ -2120,7 +2120,12 @@ export async function ncc_ws(task, opts) {
externals['path-to-regexp'] = 'next/dist/compiled/path-to-regexp' externals['path-to-regexp'] = 'next/dist/compiled/path-to-regexp'
export async function path_to_regexp(task, opts) { export async function path_to_regexp(task, opts) {
await task await task
.source(relative(__dirname, require.resolve('path-to-regexp'))) .source(
join(
dirname(relative(__dirname, require.resolve('path-to-regexp'))),
'*.{js,map}'
)
)
.target('dist/compiled/path-to-regexp') .target('dist/compiled/path-to-regexp')
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment