Skip to content

Commit

Permalink
Updated to EsBuildPlugin, and updated target to be 'esnext'
Browse files Browse the repository at this point in the history
  • Loading branch information
DownUndaDev committed Jul 9, 2024
1 parent 93113e8 commit 2402b33
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/config/typescript-loaders-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function getTypeScriptLoaderWebpackConfig(
},
}

const esBuildTarget = buildTarget === 'client' ? 'es2015' : 'node14'
const esBuildTarget = buildTarget === 'client' ? 'esnext' : 'node18'

const esbuildLoader = {
loader: 'esbuild-loader',
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/config/webpack.client.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { clientBaseConfig } from './webpack.client'
import { prodConfig } from './webpack.prod'
import { CreateWebpackConfig } from '.'
import { getTypeScriptLoaderWebpackConfig } from './typescript-loaders-config'
import { ESBuildMinifyPlugin } from 'esbuild-loader'
import { EsbuildPlugin } from 'esbuild-loader'

/** Webpack config for the client in production */
export const clientProdConfig: CreateWebpackConfig = (options) => {
Expand Down Expand Up @@ -38,8 +38,8 @@ export const clientProdConfig: CreateWebpackConfig = (options) => {
{
optimization: {
minimizer: [
new ESBuildMinifyPlugin({
target: 'es2015',
new EsbuildPlugin({
target: 'esnext',
format: 'iife',
}),
],
Expand Down
6 changes: 3 additions & 3 deletions packages/cli/src/config/webpack.prod.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import webpack from 'webpack'
import { CreateWebpackConfig } from '.'
import { ESBuildMinifyPlugin } from 'esbuild-loader'
import { EsbuildPlugin } from 'esbuild-loader'

/** Webpack settings for all production builds */
export const prodConfig: CreateWebpackConfig = () => ({
devtool: 'source-map',
mode: 'production',
optimization: {
minimizer: [
new ESBuildMinifyPlugin({
target: 'es2015',
new EsbuildPlugin({
target: 'esnext',
}),
],
},
Expand Down

0 comments on commit 2402b33

Please sign in to comment.