Closed nickroberts closed 3 years ago
When generating a config for a project, it replaces the entire targets object, instead of appending to it.
This was done on the latest create-nx-workspace, with the default app named site.
create-nx-workspace
site
Before project.json
{ "root": "apps/site", "sourceRoot": "apps/site", "projectType": "application", "targets": { "build": { "executor": "@nrwl/next:build", "outputs": ["{options.outputPath}"], "defaultConfiguration": "production", "options": { "root": "apps/site", "outputPath": "dist/apps/site" }, "configurations": { "production": {} } }, "serve": { "executor": "@nrwl/next:server", "options": { "buildTarget": "site:build", "dev": true }, "configurations": { "production": { "buildTarget": "site:build:production", "dev": false } } }, "export": { "executor": "@nrwl/next:export", "options": { "buildTarget": "site:build:production" } }, "test": { "executor": "@nrwl/jest:jest", "outputs": ["coverage/apps/site"], "options": { "jestConfig": "apps/site/jest.config.js", "passWithNoTests": true } }, "lint": { "executor": "@nrwl/linter:eslint", "outputs": ["{options.outputFile}"], "options": { "lintFilePatterns": ["apps/site/**/*.{ts,tsx,js,jsx}"] } } }, "tags": [] }
Command ran
nx g nx-stylelint:configuration --project site
After project.json
{ "root": "apps/site", "sourceRoot": "apps/site", "projectType": "application", "targets": { "stylelint": { "executor": "nx-stylelint:lint", "options": { "config": "apps/site/.stylelintrc.json", "lintFilePatterns": ["apps/site/**/*.css"] } } }, "tags": [] }
@nickroberts I'm sorry I will fix this immediately
@nickroberts Should be fixed in nx-stylelint@12.3.1
When generating a config for a project, it replaces the entire targets object, instead of appending to it.
This was done on the latest
create-nx-workspace
, with the default app namedsite
.Before project.json
Command ran
After project.json