From 74dde353cfb31b745535c9d51afb84cbda2459e9 Mon Sep 17 00:00:00 2001 From: Katie Byers Date: Fri, 9 Sep 2022 15:02:08 -0700 Subject: [PATCH] fix output path for loaders --- packages/nextjs/rollup.npm.config.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/nextjs/rollup.npm.config.js b/packages/nextjs/rollup.npm.config.js index 7a6205d34382..b5083370fe3d 100644 --- a/packages/nextjs/rollup.npm.config.js +++ b/packages/nextjs/rollup.npm.config.js @@ -19,8 +19,7 @@ export default [ packageSpecificConfig: { plugins: [plugins.makeRemoveMultiLineCommentsPlugin()], output: { - // Preserve the original file structure (i.e., so that everything is still relative to `src`). (Not entirely - // clear why this is necessary here and not for other entrypoints in this file.) + // Preserve the original file structure (i.e., so that everything is still relative to `src`) entryFileNames: 'config/templates/[name].js', // this is going to be add-on code, so it doesn't need the trappings of a full module (and in fact actively @@ -43,6 +42,9 @@ export default [ packageSpecificConfig: { output: { + // Preserve the original file structure (i.e., so that everything is still relative to `src`) + entryFileNames: 'config/loaders/[name].js', + // make it so Rollup calms down about the fact that we're combining default and named exports exports: 'named', },