Skip to content

Commit

Permalink
fix default vendrPrefix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppeg committed Jun 19, 2017
1 parent e7327b9 commit df90cc5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/babel-external.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,12 @@ export default function() {
visitor: {
Program(path, state) {
if (!plugins) {
const { sourceMaps, vendorPrefix } = state.opts
plugins = combinePlugins(state.opts.plugins, {
sourceMaps: state.opts.sourceMaps || state.file.opts.sourceMaps,
vendorPrefix: state.opts.vendorPrefix || true
sourceMaps: sourceMaps || state.file.opts.sourceMaps,
vendorPrefix: typeof vendorPrefix === 'boolean'
? vendorPrefix
: true
})
}
},
Expand Down
7 changes: 5 additions & 2 deletions src/babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,9 +345,12 @@ export default function({ types: t }) {
state.file.hasJSXStyle = false
state.imports = []
if (!plugins) {
const { sourceMaps, vendorPrefix } = state.opts
plugins = combinePlugins(state.opts.plugins, {
sourceMaps: state.opts.sourceMaps || state.file.opts.sourceMaps,
vendorPrefix: state.opts.vendorPrefix || true
sourceMaps: sourceMaps || state.file.opts.sourceMaps,
vendorPrefix: typeof vendorPrefix === 'boolean'
? vendorPrefix
: true
})
}
},
Expand Down

0 comments on commit df90cc5

Please sign in to comment.