Skip to content

Commit

Permalink
feat: support sourcemap
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed May 10, 2020
1 parent 136395c commit 76fc388
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ module.exports = {
// All options are optional
target: 'es2015', // default, or 'es20XX', 'esnext'
jsxFactory: 'React.createElement',
jsxFragment: 'React.Fragment'
jsxFragment: 'React.Fragment',
sourceMap: false // Enable sourcemap
},
},
],
Expand Down
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ module.exports = async function (source) {
target: options.target || 'es2015',
loader: ext.slice(1),
jsxFactory: options.jsxFactory,
jsxFragment: options.jsxFragment
jsxFragment: options.jsxFragment,
sourcemap: options.sourceMap
})
done(null, result.js, result.jsSourceMap)
} catch (err) {
Expand Down

0 comments on commit 76fc388

Please sign in to comment.