Skip to content

Commit 1d3f577

Browse files
committed
Optional sourcemaps
1 parent c65ab43 commit 1d3f577

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

rollup.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import globals from 'rollup-plugin-node-globals'
2222
import ts from 'rollup-plugin-ts'
2323

2424
const production = !process.env.ROLLUP_WATCH
25+
const sourcemap = process.env.SOURCE_MAP === 'true'
2526

2627
const plugins = [
2728
del({
@@ -32,6 +33,7 @@ const plugins = [
3233
postcss({
3334
extract: path.join('css', 'web.css'),
3435
minimize: production,
36+
sourceMap: sourcemap,
3537
config: false
3638
}),
3739
vue({
@@ -197,6 +199,7 @@ export default {
197199
output: {
198200
dir: 'dist',
199201
format: 'amd',
202+
sourcemap: sourcemap,
200203
chunkFileNames: path.join('js', 'chunks', production ? '[name]-[hash].js' : '[name].js'),
201204
entryFileNames: path.join('js', production ? '[name]-[hash].js' : '[name].js')
202205
},

0 commit comments

Comments
 (0)