davestewart / nuxt-content-assets

Enable locally-located assets in Nuxt Content

Home Page:https://npmjs.com/package/nuxt-content-assets

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Automatically determine assets

davestewart opened this issue · comments

Background

Right now, the module relies on a list of asset extensions, so that only asset files are copied and ignored.

It might be better if we knew what file types were documents, so that anything else is deemed an asset by default.

Proposal

Potentially find out what transformers are registered and go from there.

Also, review Content's path meta rules, as these may play a part.

As a last resort, supply a string of defaults; could be just excludeExtensions ?

Notes

Transformers seem to be listed here:

Not sure if there is a way to get them outside of Content?

Potentially hook into content:context:

    nuxt.hook('content:context' as any, (config: any) => {
      console.log('content:context', { config })
    })

That is called in Content, here: