3.11.0
Environment Info:
System:
OS: macOS 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Binaries:
Node: 10.16.2 - /usr/local/bin/node
Yarn: 1.17.3 - /usr/local/bin/yarn
npm: 6.11.3 - /usr/local/bin/npm
Browsers:
Chrome: 77.0.3865.90
Firefox: Not Found
Safari: 13.0
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0
@vue/babel-plugin-transform-vue-jsx: 1.0.0
@vue/babel-preset-app: 3.11.0
@vue/babel-preset-jsx: 1.1.0
@vue/babel-sugar-functional-vue: 1.0.0
@vue/babel-sugar-inject-h: 1.0.0
@vue/babel-sugar-v-model: 1.0.0
@vue/babel-sugar-v-on: 1.1.0
@vue/cli-overlay: 3.11.0
@vue/cli-plugin-babel: ^3.11.0 => 3.11.0
@vue/cli-plugin-eslint: ^3.11.0 => 3.11.0
@vue/cli-service: ^3.11.0 => 3.11.0
@vue/cli-shared-utils: 3.11.0
@vue/component-compiler-utils: 3.0.0
@vue/preload-webpack-plugin: 1.1.1
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.0.0 => 5.2.3 (4.7.1)
vue: ^2.6.10 => 2.6.10
vue-eslint-parser: 2.0.3 (5.0.0)
vue-hot-reload-api: 2.3.4
vue-loader: 15.7.1
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.10 => 2.6.10
vue-template-es2015-compiler: 1.9.1
npmGlobalPackages:
@vue/cli: 3.11.0
vue.config.js
with externals: ['vue', 'axios']
vue-cli-service build --target lib --name index ./src/index.js
i want my library doesn't contain axios
or vue
ERROR Invalid options in vue.config.js: "externals" is not allowed
externals
is a webpack config option, not a Vue CLI one.
So, it should be: configureWebpack: { externals: ['vue', 'axios'] }
Most helpful comment
externals
is a webpack config option, not a Vue CLI one.So, it should be:
configureWebpack: { externals: ['vue', 'axios'] }