Vue-cli: UMD build "window is not defined"

Created on 22 May 2018  路  2Comments  路  Source: vuejs/vue-cli

Version

3.0.0-beta.11

Reproduction link

https://github.com/vuejs/vue-cli/issues/new

Steps to reproduce

Run UMD build component in nuxt or SRR

What is expected?

We should be able to :
module.exports = {
output: {
globalObject: 'typeof self !== 'undefined' ? self : this'
}
}
"Invalid options in vue.config.js: "output" is not allowed"

What is actually happening?

"Invalid options in vue.config.js: "output" is not allowed"
related to webpack bug https://github.com/toji/gl-matrix/issues/311

next cli-service build

Most helpful comment

This is something we probably need to fix because with --target lib the output configurations cannot be modified.

All 2 comments

vue.config.js is not a webpack config file.

Look in the repository's /docs folder to learn how to adjust webpack config in vue-cli 3

This is something we probably need to fix because with --target lib the output configurations cannot be modified.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

light24bulbs picture light24bulbs  路  41Comments

brunoseco picture brunoseco  路  35Comments

italomaia picture italomaia  路  88Comments

dimavolo picture dimavolo  路  75Comments

wuyuweixin picture wuyuweixin  路  35Comments