-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
if vercel/next.js#13542 is merged, most of the yarn workspace + typescript config will be picked up automatically, removing the need for next-transpile-modules
- Loading branch information
Showing
1 changed file
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
// Tell webpack to compile the "bar" package, necessary if you're using the export statement for example | ||
// https://www.npmjs.com/package/next-transpile-modules | ||
const withTM = require("next-transpile-modules")(["bar"]); | ||
//const withTM = require("next-transpile-modules")(["bar"]); | ||
|
||
const TsconfigPathsPlugin = require("tsconfig-paths-webpack-plugin"); | ||
|
||
const nextConfig = { | ||
webpack: function (config) { | ||
/* | ||
Optionnaly, adding the following to modules | ||
will resolve modules using relative paths instead of | ||
going through `<rootDir>/node_modules` | ||
*/ | ||
/* | ||
config.resolve.modules = [ | ||
path.join(__dirname, ".."), | ||
...config.resolve.modules, | ||
]; | ||
*/ | ||
config.resolve.plugins = [ | ||
...config.resolve.plugins, | ||
new TsconfigPathsPlugin(), | ||
]; | ||
|
||
return config; | ||
}, | ||
}; | ||
|
||
module.exports = withTM(nextConfig); | ||
//module.exports = withTM(nextConfig); | ||
module.exports = nextConfig; |