mirror of
https://github.com/Eugeny/tabby.git
synced 2025-02-17 14:49:39 +08:00
use eval sourcemaps in dev mode on windows
This commit is contained in:
parent
6c7a8092a4
commit
0a67987e3c
@ -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…
Reference in New Issue
Block a user