chore: upgrade to webpack encore 7
This commit is contained in:
1 parent
32083c7966
commit
3428408db5
5 files changed
+1241
-2191
No files matched your search
@@ -0,0 +1 @@
|
||||
defaults
|
||||
+2
-1
@@ -40,6 +40,7 @@ $rsyncOptions = [
|
||||
'.env.dev.local.php',
|
||||
'.env.test',
|
||||
'.env.test.local',
|
||||
'.browserslistrc',
|
||||
'.gitignore',
|
||||
'.nvmrc',
|
||||
'.php-cs-fixer.cache',
|
||||
@@ -59,7 +60,7 @@ $rsyncOptions = [
|
||||
'public/.htaccess',
|
||||
'ray.php',
|
||||
'tailwind.config.js',
|
||||
'webpack.config.js',
|
||||
'webpack.config.mjs',
|
||||
'bin/.phpunit',
|
||||
'temp/',
|
||||
'tests/',
|
||||
|
||||
Generated
+1223
-2179
File diff suppressed because it is too large.
Load diff
+6
-6
@@ -1,26 +1,26 @@
|
||||
{
|
||||
"name": "myep",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.17.0",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@babel/core": "^8.0.7",
|
||||
"@babel/preset-env": "^8.0.7",
|
||||
"@hotwired/stimulus": "^3.0.0",
|
||||
"@symfony/stimulus-bridge": "^3.2.0",
|
||||
"@symfony/webpack-encore": "^6.0.0",
|
||||
"@symfony/webpack-encore": "^7.2.0",
|
||||
"@tailwindcss/forms": "^0.5.9",
|
||||
"@tailwindcss/typography": "^0.5.15",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"babel-plugin-polyfill-corejs3": "^1.0.0",
|
||||
"core-js": "^3.38.0",
|
||||
"cypress": "^15.5.0",
|
||||
"file-loader": "^6.2.0",
|
||||
"htmx.org": "^1.9.12",
|
||||
"lightningcss": "^1.33.0",
|
||||
"postcss": "^8.4.49",
|
||||
"postcss-loader": "^8.1.1",
|
||||
"regenerator-runtime": "^0.13.9",
|
||||
"tailwindcss": "^3.4.15",
|
||||
"tippy.js": "^6.3.7",
|
||||
"toastify-js": "^1.12.0",
|
||||
"webpack": "^5.74.0",
|
||||
"webpack-cli": "^6.0.1"
|
||||
"webpack-cli": "^7.2.3"
|
||||
},
|
||||
"license": "WTFPL",
|
||||
"private": true,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const Encore = require('@symfony/webpack-encore');
|
||||
import Encore from '@symfony/webpack-encore';
|
||||
|
||||
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||
@@ -17,9 +17,13 @@ Encore
|
||||
.cleanupOutputBeforeBuild()
|
||||
.enableSourceMaps(!Encore.isProduction())
|
||||
.enableVersioning(Encore.isProduction())
|
||||
.configureBabelPresetEnv((config) => {
|
||||
config.useBuiltIns = 'usage';
|
||||
config.corejs = '3.23';
|
||||
// Babel 8 dropped preset-env's useBuiltIns/corejs; polyfill-corejs3 is its replacement
|
||||
.configureBabel((babelConfig) => {
|
||||
babelConfig.plugins.push(['polyfill-corejs3', {method: 'usage-global', version: '3.23'}]);
|
||||
})
|
||||
// Encore 7 ships no CSS minifier of its own
|
||||
.configureCssMinimizerPlugin((options, MinimizerPlugin) => {
|
||||
options.minify = MinimizerPlugin.lightningCssMinify;
|
||||
})
|
||||
.enablePostCssLoader()
|
||||
.copyFiles([
|
||||
@@ -30,4 +34,4 @@ Encore
|
||||
])
|
||||
;
|
||||
|
||||
module.exports = Encore.getWebpackConfig();
|
||||
export default await Encore.getWebpackConfig();
|
||||
Reference in new issue
Block a user