-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@nrwl/nx-plugin:plugin generator includes .ts files in dist #9283
Comments
Wow, you guys are very quick to reply! The issue does not occur when using the However, when using I have updated the "steps to reproduce" in order to be more concise 😁 |
The issues seems to be caused by
Adding |
Double checking in my repo, my workspace is on 13.8.7. Are you on windows by chance? |
Here is the project.json for the {
"root": "packages/my-plugin",
"sourceRoot": "packages/my-plugin/src",
"targets": {
"build": {
"executor": "@nrwl/js:tsc",
"outputs": ["{options.outputPath}"],
"options": {
"outputPath": "dist/packages/my-plugin",
"main": "packages/my-plugin/src/index.ts",
"tsConfig": "packages/my-plugin/tsconfig.lib.json",
"assets": [
"packages/my-plugin/*.md",
{
"input": "./packages/my-plugin/src",
"glob": "**/!(*.ts)",
"output": "./src"
},
{
"input": "./packages/my-plugin/src",
"glob": "**/*.d.ts",
"output": "./src"
},
{
"input": "./packages/my-plugin",
"glob": "generators.json",
"output": "."
},
{
"input": "./packages/my-plugin",
"glob": "executors.json",
"output": "."
}
]
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["packages/my-plugin/**/*.ts"]
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": ["coverage/packages/my-plugin"],
"options": {
"jestConfig": "packages/my-plugin/jest.config.js",
"passWithNoTests": true
}
}
},
"tags": []
} |
This is odd. No, I am on MacOS This is my report after running the steps you provided:
|
|
@AgentEnder please using the |
This parameter {
"input": "./packages/my-plugin/src",
"glob": "**/*",
"ignore": ["**/*.ts"],
"output": "./src"
}, |
I just retried this with 13.8.8, with the below environment. I still can't reproduce this, as the only ts files in the build were
|
@AgentEnder I created the reproduction, please check it~ #!/bin/sh
# To test followed:
npx create-nx-plugin test-nx-plugin-build-yarn --pluginName my-plugin --package-manager=yarn
cd test-nx-plugin-build-yarn
yarn nx build my-plugin
ls dist/packages/my-plugin/src/generators/my-plugin
# files generator.js generator.spec.ts schema.d.ts
# generator.d.ts generator.js.map generator.ts schema.json
#############################################################################
#Set yarn workspace followed:
yarn set version 3.2.0
cat <<EOF | tee .yarnrc.yml
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.2.0.cjs
EOF
#Add .gitignore
cat <<EOF | tee -a .gitignore
# yarn v3
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
EOF |
@michaelcamper @boeto after some research the problem seems to be a regression of A workaround in the meanwhile, if you're using {
"resolutions": {
"fast-glob": "3.2.7"
}
} |
Thanks again @gioragutt! We found it together. We'll work on pinning the version for |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
@nrwl/nx-plugin:plugin
generator defines build executor (@nrwl/js:tsc
) which still includes .ts files in build dist.Expected Behavior
".ts" should not be included in build output
Steps to Reproduce
yarn create nx-workspace my-org --preset=core --no-nx-cloud
yarn add -W -D @nrwl/nx-plugin
nx g @nrwl/nx-plugin:plugin my-plugin
nx build my-plugin
This issue seems to be related to the replacement of
@nrwl/node:package
to@nrwl/js:tsc
executor.This issue may not be prioritized if details are not provided to help us reproduce the issue.
Failure Logs
Environment
Node : 16.13.0
OS : darwin arm64
yarn : 1.22.17
nx : 13.8.7
@nrwl/angular : undefined
@nrwl/cli : 13.8.7
@nrwl/cypress : 13.8.7
@nrwl/detox : undefined
@nrwl/devkit : 13.8.7
@nrwl/eslint-plugin-nx : 13.8.7
@nrwl/express : undefined
@nrwl/jest : 13.8.7
@nrwl/js : 13.8.7
@nrwl/linter : 13.8.7
@nrwl/nest : undefined
@nrwl/next : undefined
@nrwl/node : 13.8.7
@nrwl/nx-cloud : undefined
@nrwl/react : 13.8.7
@nrwl/react-native : undefined
@nrwl/schematics : undefined
@nrwl/storybook : 13.8.7
@nrwl/tao : 13.8.7
@nrwl/web : 13.8.7
@nrwl/workspace : 13.8.7
typescript : 4.4.4
rxjs : 6.6.7
Community plugins:
@nrwl/nx-plugin: 13.8.7
The text was updated successfully, but these errors were encountered: