mirror of
https://github.com/strapi/strapi.git
synced 2025-09-15 19:39:06 +00:00
Merge pull request #16196 from hsource/harry-browserslist
This commit is contained in:
commit
f09fe7cc37
@ -61,6 +61,7 @@
|
||||
"babel-loader": "^9.1.2",
|
||||
"babel-plugin-styled-components": "2.0.2",
|
||||
"bcryptjs": "2.4.3",
|
||||
"browserslist": "^4.17.3",
|
||||
"browserslist-to-esbuild": "1.2.0",
|
||||
"chalk": "^4.1.2",
|
||||
"chokidar": "^3.5.1",
|
||||
|
@ -9,6 +9,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const { ESBuildMinifyPlugin } = require('esbuild-loader');
|
||||
const WebpackBar = require('webpackbar');
|
||||
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
||||
const browserslist = require('browserslist');
|
||||
const browserslistToEsbuild = require('browserslist-to-esbuild');
|
||||
|
||||
const alias = require('./webpack.alias');
|
||||
@ -52,7 +53,10 @@ module.exports = ({
|
||||
|
||||
const excludeRegex = createPluginsExcludePath(pluginsPath);
|
||||
|
||||
const buildTarget = browserslistToEsbuild();
|
||||
// Ensure we use the config in this directory, even if run with a different
|
||||
// working directory
|
||||
const browserslistConfig = browserslist.loadConfig({ path: __dirname });
|
||||
const buildTarget = browserslistToEsbuild(browserslistConfig);
|
||||
|
||||
return {
|
||||
mode: isProduction ? 'production' : 'development',
|
||||
|
Loading…
x
Reference in New Issue
Block a user