Add build step and update package main/module entrypoints

This commit is contained in:
Lucas Bustamante 2021-12-29 09:25:19 -03:00
parent 60e56eef96
commit 14d53393d8
1 changed files with 6 additions and 3 deletions

View File

@ -8,7 +8,8 @@
"url": "https://github.com/woocommerce/woocommerce.git"
},
"license": "GPL-3.0+",
"main": "index.js",
"main": "build/index.js",
"module": "build-module/index.js",
"dependencies": {
"@jest/globals": "^26.4.2",
"@wordpress/deprecated": "^3.2.3",
@ -24,7 +25,9 @@
},
"scripts": {
"preinstall": "npx only-allow pnpm",
"build": "./bin/build.sh",
"prepare": "pnpm run build"
"prepare": "pnpm run build",
"clean": "rm -rf ./build ./build-module",
"compile": "node ./../bin/build.js",
"build": "./bin/build.sh && pnpm run clean && pnpm run compile"
}
}