Skip to content

Commit

Permalink
fix: target
Browse files Browse the repository at this point in the history
  • Loading branch information
HomyeeKing committed Jan 14, 2025
1 parent 87dc343 commit 2b34f79
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
2 changes: 0 additions & 2 deletions packages/ice/src/service/serverCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import preBundleDeps from './preBundleDeps.js';
import { WebpackServerCompiler } from './webpackServerCompiler/compiler.js';
import VirualAssetPlugin from './webpackServerCompiler/virtualAssetPlugin.js';
import ModifyRequirePlugin from './webpackServerCompiler/modifyRequire.js';
import { externalNodeBuiltin } from './webpackServerCompiler/externalNodeBuiltin.js';

const logger = createLogger('server-compiler');

Expand Down Expand Up @@ -270,7 +269,6 @@ export function createServerCompiler(options: Options) {
...buildOptions,
externals,
plugins: [
externalNodeBuiltin.webpack(),
compilationInfo && new VirualAssetPlugin({ compilationInfo, rootDir }),
...transformWebpackPlugins,
new ModifyRequirePlugin(),
Expand Down
5 changes: 2 additions & 3 deletions packages/ice/src/service/webpackServerCompiler/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class WebpackServerCompiler {
return {
mode: 'production',
entry: options.entryPoints as string[],
target: 'node12.20',
target: false,
output: {
filename: `[name].${options.format === 'esm' ? 'mjs' : 'cjs'}`,
path: options.outdir,
Expand Down Expand Up @@ -54,9 +54,8 @@ export class WebpackServerCompiler {
],
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx', '.mjs', '...'],
alias: options.alias,
mainFields: ['module', 'main'],
extensions: ['.ts', '.tsx', '.js', '.jsx', '.mjs', '...'],
plugins: [
new TsconfigPathsPlugin({
/* options: see below */
Expand Down

This file was deleted.

0 comments on commit 2b34f79

Please sign in to comment.