diff --git a/build/configs.js b/build/configs.js index f81ec3a93..462461b3e 100644 --- a/build/configs.js +++ b/build/configs.js @@ -33,7 +33,20 @@ module.exports = [ { file: resolve('dist/vue-router.esm.js'), format: 'es' + }, + { + file: resolve('dist/vue-router.esm.browser.js'), + format: 'es', + env: 'development', + transpile: false } + // TODO: this won't work because uglify can't handle `const` or any modern JS :/ + // { + // file: resolve('dist/vue-router.esm.browser.min.js'), + // format: 'es', + // env: 'production', + // transpile: false + // } ].map(genConfig) function genConfig (opts) { @@ -46,8 +59,7 @@ function genConfig (opts) { cjs(), replace({ __VERSION__: version - }), - buble() + }) ] }, output: { @@ -64,5 +76,9 @@ function genConfig (opts) { })) } + if (opts.transpile !== false) { + config.input.plugins.push(buble()) + } + return config }