Closed afuno closed 6 years ago
@afuno You are supposed to use dist/vue-aplayer.min.js
rather than any js files in src
.
If you are using npm and ES modules, you should import vue-aplayer
as described here.
If you are not familiar with npm-based frontend development, you can just add a <script>
tag in your template file (e.g. html file) like this:
<script type="text/javascript" "src="//unpkg.com/vue-aplayer/dist/vue-aplayer.min.js" />
Hope this helps.
@SevenOutman I use as an ES module.
@afuno I see. Did you set up your webpack
to use vue-loader
to process .vue
files?
You can find an example config at my webpack.config.js:Line 15
@SevenOutman The problem arises from pure Rails 5.1.4. Together with Rails was installed Webpack(er). I have no problem with any other installed package.
@afuno So you mean you didn’t do anything with webpack, including configuring it to be capable to work with Vue(which you SHOULD do), right?
If so, check out the link in my previous comment, or refer to Vue docs to see what you are supposed to do with webpack so that it can work with Vue correctly.
Should be fixed in 1.0.2 update
Error:
I use almost pure Rails 5.1.4.