Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add rollup's entryFileNames option #178

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/plugin-factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export function pluginFactory(readFileFn?: (path: string, options: any) => Promi
cfg.preview = {
port: plugInConfig.serverPort
};
const entryFileNames = '[name].js';
const entryFileNames = plugInConfig.entryFileNames && '[name].js';
const input: InputOption = {};
let preserveEntrySignatures: PreserveEntrySignaturesOption;
if (viteOpts.command === 'build') {
Expand Down
8 changes: 8 additions & 0 deletions src/vite-plugin-single-spa.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,14 @@ declare module "vite-plugin-single-spa" {
* `vpss(<project id>)<pattern>`. The plug-in is smart enough to respect any folders in the pattern.
*/
assetFileNames?: string;
/**
* Pattern that specifies how entry file names are constructed. Its default value is
* `[name].js`.
*
* Refer to [Rollup's documentaiton](https://rollupjs.org/configuration-options/#output-entryfilenames) for
* additional information.
*/
entryFileNames?: string;
} & DebuggingOptions;

/**
Expand Down