0

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

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.