Home

Issue: 1149

Include js library in nuxt.config.js with Assets

[issue link]

Hi,

I am using Nuxt v 1.0.0.alpha5 and would like to include a js library that is 342 kb.

I can include it via the nuxt.config.js file using the Static directory (static/js/mylib.js), but it does not work with Assets (assets/js/mylib.js), and I would like to use Assets directory to take advantage of its caching capability.

// use of Static, working

  script:[
             {src:'js/mylib.js', type: 'text/javascript'}
        ]

// use of assets, not working
I tried with ./assets too

  script:[
             {src:'~assets/js/mylib.js', type: 'text/javascript'}
        ]

Is it possible ?
Many thanks

Matthieu

This question is available on Nuxt.js community (#c1009)