15 Commits

Author SHA1 Message Date
Jack Hsu
724b0c0e3c
feat(core): upgrade to webpack 5 (#7283)
* feat(core): upgrade to webpack 5

* chore(core): update webpack 5 docs
2021-10-13 00:34:28 -04:00
Jack Hsu
70c0921180
feat(react): add fast refresh support for webpack 5 (#6529) 2021-07-29 18:16:26 +00:00
Jack Hsu
369da3ee78
feat(web): add support for webpack 5 (#5892) 2021-06-29 08:41:01 -04:00
Emily Xiong
b8584a6f18
feat(react): add react fast refresh to webpack (#5612) 2021-05-18 15:47:18 -04: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
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
Jack Hsu
83865747e9
fix(react): move url-loader to the react package.json (#3356) 2020-07-17 10:41:16 -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
d593153a33
feat(react): refactored babel support so options are more easily customized (#3089)
This reverts commit 7679df22f5b90d085b5f32f2135d828036ee5aa7.
2020-05-29 02:09:47 -04:00
Victor Savkin
7679df22f5 Revert "feat(react): refactored babel support so options are more easily customized (#3058)"
This reverts commit 0e036272cbe156fe9750a2f2bc6498a08cf7f457.
2020-05-28 13:11:56 -04:00
Jack Hsu
0e036272cb
feat(react): refactored babel support so options are more easily customized (#3058) 2020-05-26 09:16:36 -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
20885513ae
fix(react): add fallback for SVG imports coming from non-TS/JS modules (#2351) 2020-01-21 10:06:30 -05:00
Jack Hsu
df7ff8cbae
feat(react): add better support for file and image imports (#2245) 2019-12-30 13:36:44 -05:00