@nx/next 16.8.0-beta.4 → 16.8.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/package.json +9 -9
  2. package/plugins/component-testing.js +14 -8
  3. package/plugins/with-less.js +19 -14
  4. package/plugins/with-nx.js +27 -28
  5. package/plugins/with-stylus.js +18 -14
  6. package/src/executors/build/build.impl.js +60 -66
  7. package/src/executors/build/lib/create-next-config-file.js +2 -4
  8. package/src/executors/build/lib/update-package-json.js +2 -4
  9. package/src/executors/export/export.impl.js +29 -32
  10. package/src/executors/server/custom-server.impl.js +27 -45
  11. package/src/executors/server/server.impl.js +52 -56
  12. package/src/generators/application/application.js +38 -37
  13. package/src/generators/application/lib/add-e2e.js +35 -31
  14. package/src/generators/application/lib/add-jest.js +29 -26
  15. package/src/generators/application/lib/add-linting.js +50 -47
  16. package/src/generators/application/lib/add-project.js +3 -1
  17. package/src/generators/application/lib/create-application-files.js +26 -8
  18. package/src/generators/application/lib/normalize-options.js +40 -33
  19. package/src/generators/application/lib/set-defaults.js +5 -7
  20. package/src/generators/application/lib/update-cypress-tsconfig.js +4 -1
  21. package/src/generators/component/component.js +16 -13
  22. package/src/generators/custom-server/custom-server.js +68 -69
  23. package/src/generators/cypress-component-configuration/cypress-component-configuration.js +55 -57
  24. package/src/generators/init/init.js +36 -33
  25. package/src/generators/library/lib/normalize-options.js +14 -14
  26. package/src/generators/library/library.js +52 -47
  27. package/src/generators/page/page.js +21 -14
  28. package/src/migrations/update-12-10-0/fix-page-dir-for-eslint.js +23 -24
  29. package/src/migrations/update-12-8-0/remove-styled-jsx-babel-plugin.js +13 -16
  30. package/src/migrations/update-13-0-0/update-emotion-setup.js +24 -27
  31. package/src/migrations/update-13-0-0/update-to-webpack-5.js +20 -23
  32. package/src/migrations/update-13-0-3/fix-less.js +15 -18
  33. package/src/migrations/update-13-1-1/enable-swc.js +28 -32
  34. package/src/migrations/update-14-0-0/add-default-development-configurations.js +22 -27
  35. package/src/migrations/update-14-4-3/add-dev-output-path.js +11 -15
  36. package/src/migrations/update-14-5-3/add-gitignore-entry.js +3 -6
  37. package/src/migrations/update-14-5-3/update-dev-output-path.js +14 -19
  38. package/src/migrations/update-14-5-7/update-next-eslint.js +18 -22
  39. package/src/migrations/update-15-8-8/add-style-packages.js +14 -18
  40. package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +3 -6
  41. package/src/migrations/update-16-3-0/remove-root-build-option.js +10 -13
  42. package/src/migrations/update-16-4-0/update-nx-next-dependency.js +12 -15
  43. package/src/utils/compose-plugins.js +12 -15
  44. package/src/utils/create-copy-plugin.js +6 -4
  45. package/src/utils/generate-globs.js +1 -1
  46. package/src/utils/styles.js +31 -11
@@ -1,23 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.update = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
- function update(tree) {
7
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
- const projects = (0, devkit_1.getProjects)(tree);
9
- projects.forEach((config, name) => {
10
- var _a, _b, _c, _d, _e;
11
- var _f, _g, _h;
12
- if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/next:build') {
13
- (_c = (_f = config.targets.build).configurations) !== null && _c !== void 0 ? _c : (_f.configurations = {});
14
- (_d = (_g = config.targets.build.configurations).development) !== null && _d !== void 0 ? _d : (_g.development = {});
15
- (_e = (_h = config.targets.build.configurations.development).outputPath) !== null && _e !== void 0 ? _e : (_h.outputPath = (0, devkit_1.joinPathFragments)('tmp', config.sourceRoot));
16
- (0, devkit_1.updateProjectConfiguration)(tree, name, config);
17
- }
18
- });
19
- yield (0, devkit_1.formatFiles)(tree);
5
+ async function update(tree) {
6
+ const projects = (0, devkit_1.getProjects)(tree);
7
+ projects.forEach((config, name) => {
8
+ if (config.targets?.build?.executor === '@nrwl/next:build') {
9
+ config.targets.build.configurations ??= {};
10
+ config.targets.build.configurations.development ??= {};
11
+ config.targets.build.configurations.development.outputPath ??=
12
+ (0, devkit_1.joinPathFragments)('tmp', config.sourceRoot);
13
+ (0, devkit_1.updateProjectConfiguration)(tree, name, config);
14
+ }
20
15
  });
16
+ await (0, devkit_1.formatFiles)(tree);
21
17
  }
22
18
  exports.update = update;
23
19
  exports.default = update;
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.update = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
5
  const add_gitignore_entry_1 = require("../../utils/add-gitignore-entry");
7
- function update(tree) {
8
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
9
- (0, add_gitignore_entry_1.addGitIgnoreEntry)(tree);
10
- yield (0, devkit_1.formatFiles)(tree);
11
- });
6
+ async function update(tree) {
7
+ (0, add_gitignore_entry_1.addGitIgnoreEntry)(tree);
8
+ await (0, devkit_1.formatFiles)(tree);
12
9
  }
13
10
  exports.update = update;
14
11
  exports.default = update;
@@ -1,28 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.update = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
- function update(tree) {
7
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
- const projects = (0, devkit_1.getProjects)(tree);
9
- projects.forEach((config, name) => {
10
- var _a, _b, _c, _d;
11
- var _e, _f;
12
- if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/next:build') {
13
- (_c = (_e = config.targets.build).configurations) !== null && _c !== void 0 ? _c : (_e.configurations = {});
14
- (_d = (_f = config.targets.build.configurations).development) !== null && _d !== void 0 ? _d : (_f.development = {});
15
- if (!config.targets.build.configurations.development.outputPath ||
16
- config.targets.build.configurations.development.outputPath ===
17
- (0, devkit_1.joinPathFragments)('tmp', config.root)) {
18
- config.targets.build.configurations.development.outputPath =
19
- config.root;
20
- (0, devkit_1.updateProjectConfiguration)(tree, name, config);
21
- }
5
+ async function update(tree) {
6
+ const projects = (0, devkit_1.getProjects)(tree);
7
+ projects.forEach((config, name) => {
8
+ if (config.targets?.build?.executor === '@nrwl/next:build') {
9
+ config.targets.build.configurations ??= {};
10
+ config.targets.build.configurations.development ??= {};
11
+ if (!config.targets.build.configurations.development.outputPath ||
12
+ config.targets.build.configurations.development.outputPath ===
13
+ (0, devkit_1.joinPathFragments)('tmp', config.root)) {
14
+ config.targets.build.configurations.development.outputPath =
15
+ config.root;
16
+ (0, devkit_1.updateProjectConfiguration)(tree, name, config);
22
17
  }
23
- });
24
- yield (0, devkit_1.formatFiles)(tree);
18
+ }
25
19
  });
20
+ await (0, devkit_1.formatFiles)(tree);
26
21
  }
27
22
  exports.update = update;
28
23
  exports.default = update;
@@ -1,31 +1,27 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateNextEslint = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
- function updateNextEslint(host) {
7
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
- const projects = (0, devkit_1.getProjects)(host);
9
- projects.forEach((project) => {
10
- var _a, _b;
11
- if (((_b = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) !== '@nrwl/next:build')
12
- return;
13
- const eslintPath = `${project.root}/.eslintrc.json`;
14
- if (!host.exists(eslintPath))
15
- return;
16
- (0, devkit_1.updateJson)(host, eslintPath, (eslintConfig) => {
17
- const nextIgnorePattern = '.next/**/*';
18
- if (eslintConfig.ignorePatterns.indexOf(nextIgnorePattern) < 0) {
19
- eslintConfig.ignorePatterns = [
20
- ...eslintConfig.ignorePatterns,
21
- nextIgnorePattern,
22
- ];
23
- }
24
- return eslintConfig;
25
- });
5
+ async function updateNextEslint(host) {
6
+ const projects = (0, devkit_1.getProjects)(host);
7
+ projects.forEach((project) => {
8
+ if (project.targets?.build?.executor !== '@nrwl/next:build')
9
+ return;
10
+ const eslintPath = `${project.root}/.eslintrc.json`;
11
+ if (!host.exists(eslintPath))
12
+ return;
13
+ (0, devkit_1.updateJson)(host, eslintPath, (eslintConfig) => {
14
+ const nextIgnorePattern = '.next/**/*';
15
+ if (eslintConfig.ignorePatterns.indexOf(nextIgnorePattern) < 0) {
16
+ eslintConfig.ignorePatterns = [
17
+ ...eslintConfig.ignorePatterns,
18
+ nextIgnorePattern,
19
+ ];
20
+ }
21
+ return eslintConfig;
26
22
  });
27
- yield (0, devkit_1.formatFiles)(host);
28
23
  });
24
+ await (0, devkit_1.formatFiles)(host);
29
25
  }
30
26
  exports.updateNextEslint = updateNextEslint;
31
27
  exports.default = updateNextEslint;
@@ -1,27 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.update = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const devkit_1 = require("@nx/devkit");
6
- function update(tree) {
7
- var _a, _b;
8
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
9
- const projects = (0, devkit_1.getProjects)(tree);
10
- const missingDeps = {};
11
- for (const [, config] of projects) {
12
- if (((_b = (_a = config.targets) === null || _a === void 0 ? void 0 : _a.build) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/next:build' &&
13
- tree.exists((0, devkit_1.joinPathFragments)(config.root, 'next.config.js'))) {
14
- const nextConfigContent = tree.read((0, devkit_1.joinPathFragments)(config.root, 'next.config.js'), 'utf-8');
15
- if (nextConfigContent.includes('@nrwl/next/plugins/with-less')) {
16
- missingDeps['less'] = '3.12.2';
17
- }
18
- if (nextConfigContent.includes('@nrwl/next/plugins/with-stylus')) {
19
- missingDeps['stylus'] = '^0.55.0';
20
- }
5
+ async function update(tree) {
6
+ const projects = (0, devkit_1.getProjects)(tree);
7
+ const missingDeps = {};
8
+ for (const [, config] of projects) {
9
+ if (config.targets?.build?.executor === '@nrwl/next:build' &&
10
+ tree.exists((0, devkit_1.joinPathFragments)(config.root, 'next.config.js'))) {
11
+ const nextConfigContent = tree.read((0, devkit_1.joinPathFragments)(config.root, 'next.config.js'), 'utf-8');
12
+ if (nextConfigContent.includes('@nrwl/next/plugins/with-less')) {
13
+ missingDeps['less'] = '3.12.2';
14
+ }
15
+ if (nextConfigContent.includes('@nrwl/next/plugins/with-stylus')) {
16
+ missingDeps['stylus'] = '^0.55.0';
21
17
  }
22
18
  }
23
- return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, missingDeps);
24
- });
19
+ }
20
+ return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, missingDeps);
25
21
  }
26
22
  exports.update = update;
27
23
  exports.default = update;
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
3
  const devkit_1 = require("@nx/devkit");
5
4
  const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
6
- function replacePackage(tree) {
7
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
- yield (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/next', '@nx/next');
9
- yield (0, devkit_1.formatFiles)(tree);
10
- });
5
+ async function replacePackage(tree) {
6
+ await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/next', '@nx/next');
7
+ await (0, devkit_1.formatFiles)(tree);
11
8
  }
12
9
  exports.default = replacePackage;
@@ -1,20 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
3
  const devkit_1 = require("@nx/devkit");
5
4
  const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
- function update(tree) {
7
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
8
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/next:build', (options, projectName, targetName) => {
9
- const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
10
- delete projectConfig.targets[targetName].options.root;
11
- (0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
12
- });
13
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/next:build', (options, projectName, targetName) => {
14
- const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
15
- delete projectConfig.targets[targetName].options.root;
16
- (0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
17
- });
5
+ async function update(tree) {
6
+ (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/next:build', (options, projectName, targetName) => {
7
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
8
+ delete projectConfig.targets[targetName].options.root;
9
+ (0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
10
+ });
11
+ (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/next:build', (options, projectName, targetName) => {
12
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
13
+ delete projectConfig.targets[targetName].options.root;
14
+ (0, devkit_1.updateProjectConfiguration)(tree, projectName, projectConfig);
18
15
  });
19
16
  }
20
17
  exports.default = update;
@@ -1,20 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
3
  const devkit_1 = require("@nx/devkit");
5
- function update(tree) {
6
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
7
- if (tree.exists('./package.json')) {
8
- (0, devkit_1.updateJson)(tree, 'package.json', (packageJson) => {
9
- if (packageJson.dependencies['@nx/next']) {
10
- packageJson.devDependencies['@nx/next'] =
11
- packageJson.dependencies['@nx/next'];
12
- delete packageJson.dependencies['@nx/next'];
13
- }
14
- return packageJson;
15
- });
16
- }
17
- yield (0, devkit_1.formatFiles)(tree);
18
- });
4
+ async function update(tree) {
5
+ if (tree.exists('./package.json')) {
6
+ (0, devkit_1.updateJson)(tree, 'package.json', (packageJson) => {
7
+ if (packageJson.dependencies['@nx/next']) {
8
+ packageJson.devDependencies['@nx/next'] =
9
+ packageJson.dependencies['@nx/next'];
10
+ delete packageJson.dependencies['@nx/next'];
11
+ }
12
+ return packageJson;
13
+ });
14
+ }
15
+ await (0, devkit_1.formatFiles)(tree);
19
16
  }
20
17
  exports.default = update;
@@ -1,24 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.composePlugins = void 0;
4
- const tslib_1 = require("tslib");
5
4
  function composePlugins(...plugins) {
6
5
  return function (baseConfig) {
7
- return function combined(phase, context) {
8
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
9
- let config = baseConfig;
10
- for (const plugin of plugins) {
11
- const fn = yield plugin;
12
- const configOrFn = fn(config);
13
- if (typeof configOrFn === 'function') {
14
- config = yield configOrFn(phase, context);
15
- }
16
- else {
17
- config = configOrFn;
18
- }
6
+ return async function combined(phase, context) {
7
+ let config = baseConfig;
8
+ for (const plugin of plugins) {
9
+ const fn = await plugin;
10
+ const configOrFn = fn(config);
11
+ if (typeof configOrFn === 'function') {
12
+ config = await configOrFn(phase, context);
19
13
  }
20
- return config;
21
- });
14
+ else {
15
+ config = configOrFn;
16
+ }
17
+ }
18
+ return config;
22
19
  };
23
20
  };
24
21
  }
@@ -32,16 +32,18 @@ function normalizeAssets(assets, root, sourceRoot) {
32
32
  }
33
33
  const assetPath = (0, path_1.normalizePath)(asset.input);
34
34
  const resolvedAssetPath = (0, path_2.resolve)(root, assetPath);
35
- return Object.assign(Object.assign({}, asset), { input: resolvedAssetPath,
35
+ return {
36
+ ...asset,
37
+ input: resolvedAssetPath,
36
38
  // Now we remove starting slash to make Webpack place it from the output root.
37
- output: asset.output.replace(/^\//, '') });
39
+ output: asset.output.replace(/^\//, ''),
40
+ };
38
41
  }
39
42
  });
40
43
  }
41
44
  function createCopyPlugin(assets, root, sourceRoot) {
42
45
  return new CopyWebpackPlugin({
43
46
  patterns: normalizeAssets(assets, root, sourceRoot).map((asset) => {
44
- var _a;
45
47
  return {
46
48
  context: asset.input,
47
49
  to: (0, path_2.join)('../public', asset.output),
@@ -51,7 +53,7 @@ function createCopyPlugin(assets, root, sourceRoot) {
51
53
  '.gitkeep',
52
54
  '**/.DS_Store',
53
55
  '**/Thumbs.db',
54
- ...((_a = asset.ignore) !== null && _a !== void 0 ? _a : []),
56
+ ...(asset.ignore ?? []),
55
57
  ],
56
58
  dot: true,
57
59
  },
@@ -23,7 +23,7 @@ due to missing "sourceRoot" in the dependencies' project configuration
23
23
  return projectDirs.map((sourceDir) => (0, path_1.resolve)(devkit_2.workspaceRoot, (0, devkit_1.joinPathFragments)(sourceDir, fileGlobPattern)));
24
24
  }
25
25
  catch (e) {
26
- throw new Error(`createGlobPatternsOfDependentProjects: Error when generating globs: ${e === null || e === void 0 ? void 0 : e.message}`);
26
+ throw new Error(`createGlobPatternsOfDependentProjects: Error when generating globs: ${e?.message}`);
27
27
  }
28
28
  }
29
29
  exports.createGlobPatternsOfDependentProjects = createGlobPatternsOfDependentProjects;
@@ -29,20 +29,40 @@ const nextSpecificStyleDependenciesCommon = {
29
29
  devDependencies: {},
30
30
  },
31
31
  };
32
- exports.nextSpecificStyleDependenciesBabel = Object.assign(Object.assign({}, nextSpecificStyleDependenciesCommon), { 'styled-components': {
32
+ exports.nextSpecificStyleDependenciesBabel = {
33
+ ...nextSpecificStyleDependenciesCommon,
34
+ 'styled-components': {
33
35
  dependencies: styled_1.cssInJsDependenciesBabel['styled-components'].dependencies,
34
- devDependencies: Object.assign(Object.assign({}, styled_1.cssInJsDependenciesBabel['styled-components'].devDependencies), { 'babel-plugin-styled-components': versions_2.babelPluginStyledComponentsVersion }),
35
- }, '@emotion/styled': {
36
- dependencies: Object.assign(Object.assign({}, styled_1.cssInJsDependenciesBabel['@emotion/styled'].dependencies), { '@emotion/server': versions_2.emotionServerVersion }),
36
+ devDependencies: {
37
+ ...styled_1.cssInJsDependenciesBabel['styled-components'].devDependencies,
38
+ 'babel-plugin-styled-components': versions_2.babelPluginStyledComponentsVersion,
39
+ },
40
+ },
41
+ '@emotion/styled': {
42
+ dependencies: {
43
+ ...styled_1.cssInJsDependenciesBabel['@emotion/styled'].dependencies,
44
+ '@emotion/server': versions_2.emotionServerVersion,
45
+ },
37
46
  devDependencies: styled_1.cssInJsDependenciesBabel['@emotion/styled'].devDependencies,
38
- } });
39
- exports.nextSpecificStyleDependenciesSwc = Object.assign(Object.assign({}, nextSpecificStyleDependenciesCommon), { 'styled-components': {
47
+ },
48
+ };
49
+ exports.nextSpecificStyleDependenciesSwc = {
50
+ ...nextSpecificStyleDependenciesCommon,
51
+ 'styled-components': {
40
52
  dependencies: styled_1.cssInJsDependenciesSwc['styled-components'].dependencies,
41
- devDependencies: Object.assign(Object.assign({}, styled_1.cssInJsDependenciesSwc['styled-components'].devDependencies), { 'babel-plugin-styled-components': versions_2.babelPluginStyledComponentsVersion }),
42
- }, '@emotion/styled': {
43
- dependencies: Object.assign(Object.assign({}, styled_1.cssInJsDependenciesSwc['@emotion/styled'].dependencies), { '@emotion/server': versions_2.emotionServerVersion }),
53
+ devDependencies: {
54
+ ...styled_1.cssInJsDependenciesSwc['styled-components'].devDependencies,
55
+ 'babel-plugin-styled-components': versions_2.babelPluginStyledComponentsVersion,
56
+ },
57
+ },
58
+ '@emotion/styled': {
59
+ dependencies: {
60
+ ...styled_1.cssInJsDependenciesSwc['@emotion/styled'].dependencies,
61
+ '@emotion/server': versions_2.emotionServerVersion,
62
+ },
44
63
  devDependencies: styled_1.cssInJsDependenciesSwc['@emotion/styled'].devDependencies,
45
- } });
64
+ },
65
+ };
46
66
  function addStyleDependencies(host, options) {
47
67
  const extraDependencies = options.swc
48
68
  ? exports.nextSpecificStyleDependenciesSwc[options.style]
@@ -55,7 +75,7 @@ function addStyleDependencies(host, options) {
55
75
  if (host.exists('pnpm-lock.yaml') &&
56
76
  (options.style === 'less' || options.style === 'styl')) {
57
77
  (0, devkit_1.updateJson)(host, `package.json`, (json) => {
58
- json.resolutions = Object.assign(Object.assign({}, json.resolutions), { 'css-loader': '1.0.1' });
78
+ json.resolutions = { ...json.resolutions, 'css-loader': '1.0.1' };
59
79
  return json;
60
80
  });
61
81
  }