batman12340
batman12340
PD🧩 Plasmo Developers
Created by batman12340 on 1/29/2024 in #👟framework
Plasmo setup with NX console
Here is an a snipt of my project.json as well. Hope it helps and if you have any improvement suggesstions, please do share with me as well.
{
"name": "spark-extension",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/spark-extension/src",
"projectType": "application",
"targets": {
"build": {
"cache": false,
"defaultConfiguration": "production",
"command": "plasmo build",
"configurations": {
"local": {
"command": "node scripts/delete-files.js chrome-mv3-prod && plasmo build --build-path=dist/apps/spark-extension --src-path=apps/spark-extension/src --env=apps/spark-extension/.env.development"
},
"market-place": {
"command": "node scripts/delete-files.js chrome-mv3-prod && plasmo build --build-path=dist/apps/spark-extension --src-path=apps/spark-extension/src --env=apps/spark-extension/.env.production && node scripts/extension-marketplace-build.js"
}
}
},
"serve": {
"command": "plasmo dev",
"defaultConfiguration": "local",
"configurations": {
"local-verbose": {
"command": "plasmo dev --verbose --build-path=dist/apps/spark-extension --src-path=apps/spark-extension/src --env=apps/spark-extension/.env.local"
}
}
}
},
"tags": []
}
{
"name": "spark-extension",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/spark-extension/src",
"projectType": "application",
"targets": {
"build": {
"cache": false,
"defaultConfiguration": "production",
"command": "plasmo build",
"configurations": {
"local": {
"command": "node scripts/delete-files.js chrome-mv3-prod && plasmo build --build-path=dist/apps/spark-extension --src-path=apps/spark-extension/src --env=apps/spark-extension/.env.development"
},
"market-place": {
"command": "node scripts/delete-files.js chrome-mv3-prod && plasmo build --build-path=dist/apps/spark-extension --src-path=apps/spark-extension/src --env=apps/spark-extension/.env.production && node scripts/extension-marketplace-build.js"
}
}
},
"serve": {
"command": "plasmo dev",
"defaultConfiguration": "local",
"configurations": {
"local-verbose": {
"command": "plasmo dev --verbose --build-path=dist/apps/spark-extension --src-path=apps/spark-extension/src --env=apps/spark-extension/.env.local"
}
}
}
},
"tags": []
}
7 replies
PD🧩 Plasmo Developers
Created by batman12340 on 1/29/2024 in #👟framework
Plasmo setup with NX console
Hello @Amix You can use the --build-path= & --src-path= & --env= to define custom paths for the following. You'll still need to create a seperate tsconfig where you specify the exact path of your files. Also assests folder will also have to remain in the root of your project where the tsconfig is specified. Hope this helps, it was pretty tedious to make this work in NX and especially setting up a proper project structure.
7 replies
PD🧩 Plasmo Developers
Created by batman12340 on 1/29/2024 in #👟framework
Plasmo setup with NX console
No description
7 replies
PD🧩 Plasmo Developers
Created by batman12340 on 1/29/2024 in #👟framework
Plasmo setup with NX console
No description
7 replies