Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

(Document how to) use runtime only build of vue #6

@SebastianS90

Description

@SebastianS90

When using require(vue), then the Vue package documents that the runtime only build vue.common.js is included, as the .vue files shall be precompiled by webpack.

This package changes that behavior because it sets an alias to use vue.js instead

Note that vue.common.js contains several switches process.env.NODE_ENV !== 'production' to disable debugging code for production. When running gulp --production, then webpack injects "production" for these process.env.NODE_ENV variables. This ensures that the debugging branches are always false and minification (uglifyjs) will remove them.

But the vue.js file which will be included when using this package does not have these variables, the value is hardcoded to "development" thus enabling all debugging code regardless of the --production switch being present.

You can workaround that issue by explicitly requiring the vue.common.js file within the node_modules folder. You should at least document that this package sets the alias and how to workaround it, or in my opinion, remove the alias completely as the default behavior defined by the Vue package should fit most use cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions