Hello! I am curious about scripts (specifically build) in the package.json file when it comes to pushing an extension to production. Locally, I can:
yarn add @babel/core @babel/cli @babel/preset-env
and then update my package.json file to look like:
{
"private": true,
"scripts": {
"test": "echo Frontend testing not configured",
"test-cov": "echo Frontend testing coverage not configured",
"lint": "echo Frontend linting not configured",
"build": "rm -rf dist && mkdir dist && cp -r public/. dist/ && ./node_modules/.bin/babel ./public/js -d ./dist/js -s",
"dev": "rm -rf dist && mkdir dist && cp -r public/. dist/"
},
"dependencies": {
"@babel/cli": "^7.14.5",
"@babel/core": "^7.14.6",
"@babel/preset-env": "^7.14.7"
}
}
I kick off the server using
q2 run
and I successfully have a babeled js directory and all seems good.
I just want to ensure that I follow the correct steps when it comes time to push this out to the PTE/production environments. Do I need to do anything special to ensure that babel is installed in the container or will the dependencies object in the package.json handle that automagically?
Thanks for any help in advance!