diff --git a/lib/core/src/server/config/webpack.config.js b/lib/core/src/server/config/webpack.config.js index 0e2458f079c..ebaf1879875 100644 --- a/lib/core/src/server/config/webpack.config.js +++ b/lib/core/src/server/config/webpack.config.js @@ -80,7 +80,7 @@ export default ({ configDir, quiet, babelOptions }) => { test: /\.jsx?$/, use: [ { - loader: require.resolve('babel-loader'), + loader: 'babel-loader', options: babelOptions, }, ], diff --git a/lib/core/src/server/config/webpack.config.prod.js b/lib/core/src/server/config/webpack.config.prod.js index 09ff0e7f1f8..5ab0c207cd7 100644 --- a/lib/core/src/server/config/webpack.config.prod.js +++ b/lib/core/src/server/config/webpack.config.prod.js @@ -68,7 +68,7 @@ export default ({ configDir, babelOptions }) => { test: /\.jsx?$/, use: [ { - loader: require.resolve('babel-loader'), + loader: 'babel-loader', options: babelOptions, }, ],