40 Commits

Author SHA1 Message Date
Jack Hsu
c76eb7fb74
chore(nextjs): clean up constants import path and remove support for Next.js 10 (#11287) 2022-07-25 17:51:22 +00:00
Jack Hsu
8075cb9a9f
chore(nextjs): remove outdir from Next.js config since it is no longer needed (#11257) 2022-07-22 11:06:22 -04:00
Jack Hsu
e07ef9f216
fix(nextjs): fix support for custom distDir (#10106) 2022-05-02 20:50:44 +00:00
Louis DeScioli
5cebe9ccdd
fix(nextjs): use posix path format for generated config.distdir (#8990)
ISSUES CLOSED: #8989
2022-03-10 14:51:15 +00:00
Phillip Barta
be91d1f99a
fix(core): stop inlining tsconfig-paths-webpack-plugin and use version with fix (#8357) 2022-01-27 08:59:46 -05:00
Kirils L
67ff4acea2
fix(nextjs): sourcemaps display transpiled code (#7487) 2021-10-25 10:01:07 -04:00
Jack Hsu
bedad1cc77
fix(core): patch resolve logic for tsconfig paths (#7387) 2021-10-15 20:47:18 +00:00
Victor Savkin
d79bba3630 chore(repo): update to nx 12.10 2021-09-20 16:39:13 -04:00
Jason Jean
0772cb3642
Revert "chore(repo): update nx to 12.8.0-beta.1 (#6804)" (#6831)
This reverts commit 8e8191f22c7bce330c2c314f37bdf57c71cabadb.
2021-08-24 01:48:50 +00:00
Jason Jean
8e8191f22c
chore(repo): update nx to 12.8.0-beta.1 (#6804) 2021-08-23 18:03:59 +00:00
Phumrapee Limpianchop
fc11571178
fix(nextjs): Next 11.1.0 compatibility (#6699)
Co-authored-by: Kirils L <9858620+kirjai@users.noreply.github.com>
2021-08-16 08:00:19 -07:00
Juri
79ea377a65 fix(nextjs): allow plain url-loader inlining of SVGs not just SVGR 2021-08-11 15:58:30 +02:00
kirjai
8801930553 feat(nextjs): support webpack 5 2021-06-11 16:45:14 +01:00
kirjai
f723613929 feat(nextjs): add buildLibsFromSource option 2021-06-02 17:40:28 +01:00
Jack Hsu
a7d8e2a735
feat(nextjs): add incremental build support to Next.js apps (#5360) 2021-04-20 12:01:27 -04:00
Kirils L
ffc69d41b4
feat(nextjs): add option to disable svgr (#5200) 2021-04-06 22:40:52 -04:00
Vivek More 🧐
212fb00548 cleanup(misc): use more es6 features
- Single char alternation (e.g. a|b|c|d) in a RegExp can be simplified to use a character class ([abcd]) instead.
  This usually also provides slightly better matching performance.
- Character escapes that are replaceable with the unescaped character without a change in meaning. Inside the square brackets of a character class, many escapes are unnecessary that would be necessary outside of a character class. For example the regex [\.] is identical to [.]
- If several qualified expressions occur after the qualifier having been checked for nullable, they can be replaced with optional chaining
2021-03-24 20:11:32 -04:00
Jack Hsu
3587492bb8
fix(nextjs): improve documentation for "nextConfig" option and provide better error messages (#5098) 2021-03-24 10:29:47 -04:00
Kirils L
14888e50f4
fix(nextjs): leverage nextjs for loading svgs (#5060)
omit our own svg loading fallback, so that next.js webpack config is used instead
2021-03-23 15:14:09 -04:00
Kirils L
0822d00e0c
fix(nextjs): support next 10.0.9 (#5033) 2021-03-17 19:40:42 +00:00
Sebastián Cruz
6e8349f6ed
Fix error when importing .js libraries into nextjs app (#4996)
ISSUES CLOSED: #4904
2021-03-17 19:46:38 +02:00
Katerina Skroumpelou
c9a2b2c1c0
feat(nextjs): allow custom distDir (#4885) 2021-02-26 14:35:22 -05:00
Jason Jean
fd18b5edec
feat(react): migrate next builders to devkit (#4861) 2021-02-23 11:39:20 -05:00
Tasos Bekos
1f534317d0 fix(nextjs): support shared assets
Closes #4552
2021-01-27 15:07:52 -05:00
William Ghelfi
742ea79d53
Fix svgr/webpack conf (#4327)
* fix(misc): avoid issues with refs in SVGs

The previous "import friendly" syntax was actually disabling refs in SVGs parsed by svgr.

I found 3 possible solutions:
1. Removing "![path]"
2. Separating "+ref![path]" with another comma: "+ref,![path]"
3. Rewriting the loader entry in the style of the other loader entries

I chose the last one for added clarity within the file.

* fix(core): fix compilation errors
2021-01-15 09:09:55 -05:00
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