mirror of
https://github.com/Eugeny/tabby
synced 2025-03-04 15:17:17 +00:00
use eval sourcemaps in dev mode on windows
This commit is contained in:
parent
6c7a8092a4
commit
0a67987e3c
1 changed files with 6 additions and 1 deletions
|
@ -12,11 +12,16 @@ module.exports = options => {
|
|||
filename: '[file].map',
|
||||
moduleFilenameTemplate: `webpack-tabby-${options.name}:///[resource-path]`,
|
||||
}
|
||||
let SourceMapDevToolPlugin = webpack.SourceMapDevToolPlugin
|
||||
|
||||
if (process.env.CI) {
|
||||
sourceMapOptions.append = '\n//# sourceMappingURL=../../../app.asar.unpacked/assets/webpack/[url]'
|
||||
}
|
||||
|
||||
if (process.platform === 'win32' && process.env.TABBY_DEV) {
|
||||
SourceMapDevToolPlugin = webpack.EvalSourceMapDevToolPlugin
|
||||
}
|
||||
|
||||
const isDev = !!process.env.TABBY_DEV
|
||||
const config = {
|
||||
target: 'node',
|
||||
|
@ -103,7 +108,7 @@ module.exports = options => {
|
|||
...options.externals || [],
|
||||
],
|
||||
plugins: [
|
||||
new webpack.SourceMapDevToolPlugin(sourceMapOptions),
|
||||
new SourceMapDevToolPlugin(sourceMapOptions),
|
||||
],
|
||||
}
|
||||
if (process.env.PLUGIN_BUNDLE_ANALYZER === options.name) {
|
||||
|
|
Loading…
Add table
Reference in a new issue