Reputation: 1308
I need to add a custom nodejs script to the project that performs a few manipulations on icon files before build and before starting development.
What is a good place to add it? Maybe in nuxt.config.js or in some other place
Upvotes: 0
Views: 399
Reputation: 490
in your nuxt.config.js
{
...,
hooks: {
build: {
before(nuxt, buildOptions) {
// your logic here
}
}
},
...
}
More about nuxt hooks: https://nuxtjs.org/docs/configuration-glossary/configuration-hooks/
More builder hooks: https://nuxtjs.org/docs/internals-glossary/internals-builder/#hooks
Upvotes: 1