diff --git a/vue.config.js b/vue.config.js index 86609b0..0de5588 100644 --- a/vue.config.js +++ b/vue.config.js @@ -3,17 +3,17 @@ module.exports = { css: { extract: false }, - configureWebpack: { - output: { - library: 'VueLineUp' - }, - externals: { - lineupjs: { - amd: 'lineupjs', - root: 'LineUpJS', - commonjs: 'lineupjs', - commonjs2: 'lineupjs' - } - }, + configureWebpack: (config) => { + config.output.library = 'VueLineUp'; + if (process.env.NODE_ENV === 'production') { + config.externals = Object.assign(config.externals ||{}, { + lineupjs: { + amd: 'lineupjs', + root: 'LineUpJS', + commonjs: 'lineupjs', + commonjs2: 'lineupjs' + } + }) + } } }