15 Commits

Author SHA1 Message Date
Jack Hsu
09a205c995
fix(nextjs): remove duplicated public folder in dist (#4389) 2020-12-23 14:48:38 -05:00
victor savkin
234ca36385 cleanup(misc): clean up devkit 2020-11-26 10:19:13 -05:00
Jack Hsu
af15cb09a6
feat(nextjs): add nextConfig option for nextjs build builder to provide customization (#3899) 2020-10-09 19:36:04 -06:00
Spencer Elliott
5b6df632cb
fix(core): resolve webpack loaders with require.resolve() (#3436)
* fix(core): resolve webpack loaders with `require.resolve()`

With strict package managers such as pnpm or Yarn PnP, transitive
dependencies are *not* hoisted to the root node_modules folder. This
means that a webpack config defined within a package like
'@nrwl/cypress' cannot resolve loaders like 'ts-loader', unless
'ts-loader' is declared in the workspace's own package.json.

This is a problem because the workspace might define a different version
of 'ts-loader', incompatible with the version declared by
'@nrwl/cypress/package.json'. The workspace should not need to declare
a dependency on 'ts-loader' anyway.

See also:
* https://github.com/pnpm/pnpm/issues/801
* https://github.com/webpack/webpack/issues/5087

* fix(core): resolve absolute 'raw-loader' path

When replacing the 'raw-loader' rule in the `getStylesPartial` function,
check for the absolute path of 'raw-loader' rather than just the name.
2020-08-08 17:53:00 -04:00
Jack Hsu
ed8bd2bbe8
Revert "fix(core): resolve webpack loaders with require.resolve() (#3341)" (#3371)
This reverts commit d74ab4e9d6eae6d83c3bb76072b45f7a4c7a6305.
2020-07-20 16:24:47 -04:00
Spencer Elliott
d74ab4e9d6
fix(core): resolve webpack loaders with require.resolve() (#3341)
With strict package managers such as pnpm or Yarn PnP, transitive
dependencies are *not* hoisted to the root node_modules folder. This
means that a webpack config defined within a package like
'@nrwl/cypress' cannot resolve loaders like 'ts-loader', unless
'ts-loader' is declared in the workspace's own package.json.

This is a problem because the workspace might define a different version
of 'ts-loader', incompatible with the version declared by
'@nrwl/cypress/package.json'. The workspace should not need to declare
a dependency on 'ts-loader' anyway.

See also:
* https://github.com/pnpm/pnpm/issues/801
* https://github.com/webpack/webpack/issues/5087
2020-07-15 13:55:38 -04:00
Jack Hsu
bd5ca7d909
fix(nextjs): copy public folder to dist when building Next app (#3047)
Closes #3019
2020-05-22 15:56:15 -04:00
Jason Jean
e06822da7e
chore(repo): update prettier to v2 (#2934)
this is just for the repo, and not the workspace

Co-authored-by: Rares Matei <matei.rar@gmail.com>
2020-04-29 01:09:37 -04:00
Jack Hsu
36e1d40784
feat(nextjs): support building and serving production server (#2792) 2020-04-04 14:57:08 -04:00
Jack Hsu
27f523493e
feat(nextjs): add support for custom next config and optimize style enhancer usages (#2727)
Related #2490
2020-03-26 21:16:09 -04:00
Jo Hanna Pearce
2f72133dc7 feat(nextjs): add fileReplacements to the builder config 2020-01-31 11:23:49 +00:00
Jo Pearce
e72c3baf1f feat(nextjs): allow SVG imports from non-TS/JS modules (#2359) 2020-01-21 20:05:55 -05:00
Thomas
8010e67b00 fix(nextjs): fix issue where using .ts files in next.js app would res… (#2276)
* fix(nextjs): fix issue where using .ts files in next.js app would result in a compile error

The issue was just a misconfiguration in the next's config.ts file: Webpack was only applying the
babel loader on .tsx files.
The updated regex will now load both .ts and .tsx files.

ISSUES CLOSED: #2249

* cleanup(testing): add missing tests for pull request #2276

Co-authored-by: tdnll <40502786+tdnll@users.noreply.github.com>
2020-01-14 10:40:51 -05:00
Jason Jean
6c83f2dc59
feat(nextjs): support next@9.1.5 and add log when ready (#2216) 2019-12-18 23:10:29 -05:00
Victor Savkin
09a94b8958 feat(nx): implement next support 2019-09-08 14:36:30 -04:00