Skip to content

Commit

Permalink
fix: nextjs plugin dist folder
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Mar 6, 2021
1 parent 8f10231 commit afd9751
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion examples/starter/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ module.exports = withStories({
webpack5: true,
},
configPath: '.config',
distDir: 'dist',
});
7 changes: 4 additions & 3 deletions integrations/nextjs-plugin/src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = ({
configPath,
presets,
staticFolder,
distFolder,
distFolder: userDistFolder,
webpack,
...rest
}: BuildProps) => () => {
Expand All @@ -35,11 +35,12 @@ module.exports = ({
configPath,
webpack,
};
const distFolder = userDistFolder || path.join(process.cwd(), 'public');
const buildConfig: BuildProps = {
...defaultCompileProps,
...{
distFolder: distFolder || path.join(process.cwd(), 'public'),
staticFolder: staticFolder || path.join(process.cwd(), 'dist', 'static'),
distFolder,
staticFolder: staticFolder || path.join(distFolder, 'static'),
},
...userProps,
};
Expand Down

0 comments on commit afd9751

Please sign in to comment.