Skip to content

Commit

Permalink
feat: format alias
Browse files Browse the repository at this point in the history
  • Loading branch information
HomyeeKing committed Jan 17, 2025
1 parent e45c591 commit d1ecdc2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/ice/src/service/serverCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ export function createServerCompiler(options: Options) {
...transformWebpackPlugins,
new ModifyRequirePlugin(),
].filter(Boolean),
rootDir,
});
esbuildResult = (await webpackServerCompiler.build())?.compilation;
}(buildOptions);
Expand Down
6 changes: 6 additions & 0 deletions packages/ice/src/service/webpackServerCompiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ export class WebpackServerCompiler {
const hashKey = '';
const cssFilename = undefined;
const cssChunkFilename = undefined;

for (const key of Object.keys(options.alias)) {
if (!path.isAbsolute(options.alias[key])) {
options.alias[key] = path.resolve(options.rootDir, options.alias[key]);
}
}
return {
mode: 'production',
entry: options.entryPoints as string[],
Expand Down

0 comments on commit d1ecdc2

Please sign in to comment.