nhn / toast-ui.vue-calendar

Toast UI Calendar for Vue
MIT License
195 stars 54 forks source link

When I accelerated Calendar with cdn, there was a Calendar is not defined error #33

Closed umbrella22 closed 5 years ago

umbrella22 commented 5 years ago

Version 1.1.0

Test Environment windows

Current Behavior

I tried to speed Calendar up with cdn, but I got a question about Calendar is not defined. What should I do?

// Write example code
// It is excluded from webpack
    externals: {
        vue: 'Vue',
        echarts: 'echarts',
        'element-ui': 'ELEMENT',
        'tui-calendar': 'Calendar',
    },
<body>
    <div id="app"></div>
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>    
    <script src="https://cdn.bootcss.com/vue/2.6.10/vue.runtime.min.js"></script>
    <script src="https://cdn.bootcss.com/element-ui/2.11.1/index.js"></script>
    <script src="https://cdn.bootcss.com/raphael/2.2.8/raphael.min.js"></script>
    <script src="https://uicdn.toast.com/tui.code-snippet/latest/tui-code-snippet.js"></script>
    <script src="http://uicdn.toast.com/tui-calendar/latest/tui-calendar.min.js"></script>
    <script src="https://cdn.bootcss.com/echarts/4.2.1-rc1/echarts.common.min.js"></script>
</body>

Expected Behavior

It does not report any errors and works properly.

umbrella22 commented 5 years ago

Well, I think it was my own mistake to mistake its name in the global variable, which led to this webpack