Laravel-mix extract 之后 vue 为啥不能正常使用?

请教一个关于laravel-mix
我使用extract把vuejquery打包在一起,按照了顺心引入了相应的js,但是我再blade视图里面使用vue的data里面定义的数据却不能访问;我google好多资料也没找到解决办法,特来请教
打包代码

mix.js('resources/assets/js/app.js', 'public/js')
    .extract(['jquery' , 'vue'])
   .sass('resources/assets/sass/vendor.scss', 'public/css/vendor.css')
    .sass('resources/assets/sass/app.scss', 'public/css/app.css');

引入文件

<script src="{{ mix('/js/manifest.js') }}"></script>
<script src="{{ mix('/js/vendor.js') }}"></script>
<script src="{{ mix('/js/app.js') }}"></script>

使用代码

@extends('layouts.app')
@section('content')
    <example></example>
    <div>@{{ message }}</div>
@endsection
@section('body-js')
    <script>
        new Vue({
            el: "#app",
            data: {
                message: "hello"
            }
        })
    </script>
@endsection

出错提示

vendor.js:11051 [Vue warn]: Property or method "message" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option. 
(found in <Root>)

我在vue的实例里面使用beforeCreate:function(){ alert() }也是可以的,这里很是不理解,特来请教,感激不尽。

《L04 微信小程序从零到发布》
从小程序个人账户申请开始,带你一步步进行开发一个微信小程序,直到提交微信控制台上线发布。
《L02 从零构建论坛系统》
以构建论坛项目 LaraBBS 为线索,展开对 Laravel 框架的全面学习。应用程序架构思路贴近 Laravel 框架的设计哲学。
讨论数量: 3

5.4内置了vue,打包后自动添加js,代码要放到#app内吧?

<div id="app">
<example></example>
</div>
7年前 评论

@andu 已经放了的,
我测试了几次,就是使用.extract(['jquery' , 'vue'])提却库文件出现问题。按照laravel-mix上的说明也按照顺序引入了那三个文件的。

7年前 评论

@伸长脖子的狼 2年了,解决了吧?

4年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!