Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
jeantil committed May 30, 2020
1 parent ca3b4d3 commit ed7a52a
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions packages/web-app/next.config.js
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;

0 comments on commit ed7a52a

Please sign in to comment.