Plugin only server side

Viewed 1568

I have a plugin that I don't want the client to see. Unfortunately it is allways built both for the server and the client. How can this be prevented?

<template>
    <div>
        Test
    </div>
</template>

<script>
    import getAll from '~/plugins/api'
    export default {
        asyncData (context, callback) {
            getAll(function(data){
                callback(null,data);
            })
        }
    }
</script>

This is my .vue file. The fetch of the data is working but i can also See the code from the client side which i don't want.

1 Answers
Related