mirror of
https://github.com/strapi/strapi.git
synced 2025-09-15 11:36:17 +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-loader": "^9.1.2",
|
||||||
"babel-plugin-styled-components": "2.0.2",
|
"babel-plugin-styled-components": "2.0.2",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
|
"browserslist": "^4.17.3",
|
||||||
"browserslist-to-esbuild": "1.2.0",
|
"browserslist-to-esbuild": "1.2.0",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"chokidar": "^3.5.1",
|
"chokidar": "^3.5.1",
|
||||||
|
@ -9,6 +9,7 @@ const HtmlWebpackPlugin = require('html-webpack-plugin');
|
|||||||
const { ESBuildMinifyPlugin } = require('esbuild-loader');
|
const { ESBuildMinifyPlugin } = require('esbuild-loader');
|
||||||
const WebpackBar = require('webpackbar');
|
const WebpackBar = require('webpackbar');
|
||||||
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
const ReactRefreshWebpackPlugin = require('@pmmmwh/react-refresh-webpack-plugin');
|
||||||
|
const browserslist = require('browserslist');
|
||||||
const browserslistToEsbuild = require('browserslist-to-esbuild');
|
const browserslistToEsbuild = require('browserslist-to-esbuild');
|
||||||
|
|
||||||
const alias = require('./webpack.alias');
|
const alias = require('./webpack.alias');
|
||||||
@ -52,7 +53,10 @@ module.exports = ({
|
|||||||
|
|
||||||
const excludeRegex = createPluginsExcludePath(pluginsPath);
|
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 {
|
return {
|
||||||
mode: isProduction ? 'production' : 'development',
|
mode: isProduction ? 'production' : 'development',
|
||||||
|
@ -7003,6 +7003,7 @@ __metadata:
|
|||||||
babel-loader: ^9.1.2
|
babel-loader: ^9.1.2
|
||||||
babel-plugin-styled-components: 2.0.2
|
babel-plugin-styled-components: 2.0.2
|
||||||
bcryptjs: 2.4.3
|
bcryptjs: 2.4.3
|
||||||
|
browserslist: ^4.17.3
|
||||||
browserslist-to-esbuild: 1.2.0
|
browserslist-to-esbuild: 1.2.0
|
||||||
chalk: ^4.1.2
|
chalk: ^4.1.2
|
||||||
chokidar: ^3.5.1
|
chokidar: ^3.5.1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user