Skip to content

Commit 8b64679

Browse files
authored
update rollup for debug (#1948)
1 parent ff90329 commit 8b64679

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rollup.config.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const pkg = require('./package.json');
77
const testing = process.env.BUILD === 'test';
88
const dev = process.env.BUILD === 'dev';
99
console.log(process.env.BUILD);
10+
const isDebug = testing || dev;
1011
const plugins = testing ?
1112
[
1213
['istanbul', {
@@ -40,7 +41,7 @@ const builds = [
4041
plugins: rollupPlugins,
4142
output: [
4243
{
43-
'sourcemap': false,
44+
'sourcemap': isDebug,
4445
'format': 'umd',
4546
'name': 'maptalks',
4647
banner,
@@ -76,7 +77,7 @@ const builds = [
7677
]
7778
}];
7879

79-
if (dev) {
80+
if (isDebug) {
8081
module.exports = [builds[0]];
8182
} else {
8283
module.exports = builds;

0 commit comments

Comments
 (0)