LinbuduLab / esbuild-plugins

ESBuild plugins by @LinbuduLab
MIT License
113 stars 18 forks source link

nx-plugin-vite does not work with @netlify-builder/deploy:deploy #75

Closed vincent-thomas closed 2 years ago

vincent-thomas commented 2 years ago

When i try to automate a build & deploy to netlify with this builder:

  // File: project.json
    "deploy": {
      "executor": "@netlify-builder/deploy:deploy",
      "options": {
        "outputPath": "dist/apps/thunder",
        "siteId": "16d309af-627a-471e-a5ec-8d739bbeb358",
        "noBuild": false,
        "buildTarget": "build"
      }
    },

    "build": {
      "executor": "nx-plugin-vite:build",
      "defaultConfiguration": "production",
      "configurations": {
        "production": {
          "outDir": "dist/apps/thunder",
          "configFile": "apps/thunder/vite.config.ts",
          "watch": false,
          "write": true,
          "emitAtRootLevel": true,
          "manifest": true
        }
      }
    }

Error output

It doesn't work and it shows error: Package "nx-plugin-vite" has no builders defined.. Maybe i can help with 'define' the builder. But it doesn't work. I've tried changing the configuration value to options like this before:

  // File: project.json

    "build": {
      "executor": "nx-plugin-vite:build",
      "defaultConfiguration": "production",
      "configurations": {
        "production": {
          "outDir": "dist/apps/thunder",
          "configFile": "apps/thunder/vite.config.ts",
          "watch": false,
          "write": true,
          "emitAtRootLevel": true,
          "manifest": true
        }
      }
    }

after:

  // File: project.json

    "build": {
      "executor": "nx-plugin-vite:build",
      "options": {
          "outDir": "dist/apps/thunder",
          "configFile": "apps/thunder/vite.config.ts",
          "watch": false,
          "write": true,
          "emitAtRootLevel": true,
          "manifest": true
        }
    }

But none of them worked

linbudu599 commented 2 years ago

Seems like you're using different outputPath in netlify builder and vite builder? You can try to make the two configurations consistent first.

vincent-thomas commented 2 years ago

Closing this as i replaced netlify with s3 and cloudfront for easier deployment.