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

sanderswang picture sanderswang  路  3Comments

NathanKleekamp picture NathanKleekamp  路  3Comments

JIANGYUJING1995 picture JIANGYUJING1995  路  3Comments

DrSensor picture DrSensor  路  3Comments

joshuajohnson814 picture joshuajohnson814  路  3Comments