chore: Use same config for branch deploys as for deploy previews (#1893) (#1916)

This commit is contained in:
Erik Ziegler authored and GitHub committed 2020-07-23 09:42:42 +02:00
1 parent 8f1785446b
commit 6a77d6c778
6 files changed
+100 -7

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
const path = require('path');
// ~~ Plugins
const PnpWebpackPlugin = require(`pnp-webpack-plugin`); // Required until Webpack@5
exports.onCreateWebpackConfig = args => {
args.actions.setWebpackConfig({
node: { fs: 'empty' },
resolve: {
plugins: [PnpWebpackPlugin],
// Note the '..' in the path because docz gatsby project lives in the '.docz' directory
modules: [
// platform/ui
path.resolve(__dirname, '../node_modules'),
// .docz
'node_modules',
],
// resolve: {
// symlinks: true,
// },
},
resolveLoader: {
plugins: [PnpWebpackPlugin.moduleLoader(module)],
},
});
};