Is this supported somehow? I'd like to execute arbitrary code to post-process the built HTML/css/etc after next.js does its thing.
You can use a custom build command in Vercel, that does both the build and the postbuild: yarn run build && yarn run your-postbuild-script.
Documentation here.
Related
I can't figure out how to make a custom build for tom-select.js. In the gruntfile.js I see this:
// build tom-select.custom.js
/* this file is generated by grunt when calling `npm run build -- --plugins=<plugins> */
so should I just list the plugins in the command line after npm run build command with --plugins flag? What is the syntax for this? Thanks!
I just found the answer:
create /build/js/tom-select.custom.js
npm run build -- --plugins=remove_button,restore_on_backspace
I am trying to build and deploy a NextJS application using the Vercel CLI.
The strategy is to pre-build and then deploy the pre-built artifacts.
vercel build
vercel deploy --prebuilt
I am getting the following errors:
Any help would be much appreciated.
There was a problem with the Vercel CLI itself.
https://github.com/vercel/vercel/discussions/8564
https://github.com/vercel/vercel/pull/8530
I wanted to do exactly what you wanted to do and I got this error.
If you use Windows cmd to run the command, you need to install WSL and run the command after installing prerequisites like node.
I have UI project which is using GRUNT to perform build and tests. When I try to invoke tests within concourse task which resource image I should use where grunt is already installed. I am getting this below error now.
/bin/bash: line 4: grunt: command not found
You can use any OCI-compatible image that has grunt preinstalled. Alternatively, make your own image and push it to a repository like dockerhub. As yet another alternative you could use a base image for your task and install grunt every time (though this is slower).
TLDR: Concourse does not provide task images and you need to use your own.
Is there a native way (no additional npm/meteor packages) to trigger a NPM script during/before/after meteor build that is located in my package.json?
Have a look at the Meteor Build plugins API http://docs.meteor.com/api/packagejs.html#build-plugin-api
Build Plugins API
Meteor packages can provide build plugins - programs that integrate
with the build tool Isobuild used to compile and bundle your
application.
Starting with Meteor 1.2, the API used to plug into the build process
is called “Build Plugins”. There are 3 phases when a package’s plugin
can run: linting, compilation and minification. Here is an overview of
operations Isobuild performs on the application and packages source:
Calling grunt-eslint causes a Cannot find module 'eslint-plugin-react' error that doesn't happen when calling eslint directly from the command line.
I have eslint-plugin-react installed globally.
Is there an easy way to make grunt eslint behave the same way as eslint?
Assuming you don't want to install the node module locally for some reason, I can think of two options. 1. Use grunt-exec within your grunt file to run eslint, or 2. As per the answer in the link below setup a symbolic link to your global node modules folder:
How to use grunt-html installed globally?