Nuxt.js: How to use WOW.js with nuxt

Created on 11 Jul 2017  路  8Comments  路  Source: nuxt/nuxt.js

I am having issues using a third party library. I have tried to follow the documentation but I am missing something. Using the starter template, I npm installed wow.js. I don't understand what to put in vendor js file.

my nuxt.config.js looks like:
plugins: [ { src: '~plugins/main.js', ssr: false } ], build: { vendor: ['wowjs'],

my main.js file in the plugin folder reads:
if (process.BROWSER_BUILD) { require('WOW') }

Any pointers?

This question is available on Nuxt.js community (#c924)
help-wanted

Most helpful comment

Will be trying some options later today, will post results.

All 8 comments

Will be trying some options later today, will post results.

@jzucadi Isthere any news?

Sorry, I haven't been able to sort this out yet.

WOW have issues when using as cjs or es6 module, you can try https://github.com/matthieua/WOW/issues/233#issuecomment-173640648

Because this issue seems to be inactive for quite some time, I'll close it now. If you feel like it deserves some attention because it's not fixed, feel free to ping me and I'll reopen it.

@shrpne pointed out, the solution is including:
require('imports?this=>window!js/wow.js');

This question has been resolved by @shrpne, see answer.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

msudgh picture msudgh  路  3Comments

mikekidder picture mikekidder  路  3Comments

shyamchandranmec picture shyamchandranmec  路  3Comments

gary149 picture gary149  路  3Comments

bimohxh picture bimohxh  路  3Comments