Closed itsjxck closed 2 years ago
Thanks, for highlighting this @itsjxck. I managed to reproduce this. I can see at least two issues with this:
.babelrc
file being generated in the library (api) project. I managed to resolve this as suggested in the discussion.I think I have a fix for this. The idea is to use the Nx Node Webpack executor instead of the plain TS build executor to make sure dependencies get bundled with the app code. Strangely when testing this with the sample todo app, by analyzing the compiled js file the Forge linter now thinks there are some missing scopes:
/.../forge-todo-app/dist/apps/forge-app/src/index.js
831:34 error Jira endpoint: POST /rest/api/3/permissions/check requires "read:permission:jira" scope permission-scope-required
To me, this looks like a bug in the Forge linter. Deploying with --no-verify
works.
Interesting. What configuration for the webpack executor worked for you?
Edit: Actually, do you mean in the @toolsplus/nx-forge:build
executor rather than configuring the executor for the library?
Currently, the plugin was using the Typescript compilation executor form @nrwl/js. Instead, the PR changes this use the Webpack build from @nrwl/node. You can find the options passed to the Webpack build in the PR. I will have to investigate a bit more on why the linting fails.
:tada: This issue has been resolved in version 1.1.2 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Getting
Error: Bundling failed: Module not found: Error: Can't resolve '@better-harvest/harvest-api' in '/Users/jdadam/nx-better-harvest/dist/apps/better-harvest/src'
when I try to deploy my app after following the guide.workspace.json
:@better-harvest/harvest-api
is imported inapps/better-harvest/src/index.ts
:nx build better-harvest
:nx deploy better-harvest
: