From e4cccc246548a1de5e7527b9ee9a9f40611a2943 Mon Sep 17 00:00:00 2001 From: Titouan Mathis Date: Thu, 7 Nov 2024 18:02:34 +0100 Subject: [PATCH 1/3] Fix CJS files being incorrectly transformed to ESM This commit fixes a recurring bug where some packages were being transpiled from CJS to ESM, resulting in exports sometimes being incorrectly transformed (i.e. js-cookie, mapbox-gl). --- packages/webpack-config/src/webpack.base.config.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/packages/webpack-config/src/webpack.base.config.js b/packages/webpack-config/src/webpack.base.config.js index fe1e966..080f30b 100644 --- a/packages/webpack-config/src/webpack.base.config.js +++ b/packages/webpack-config/src/webpack.base.config.js @@ -87,15 +87,12 @@ export default async function getWebpackBaseConfig(config, { mode = 'production' }, { test: /\.m?(j|t)s$/, - // Exclude all but packages from the `@studiometa/` namespace - exclude: [/node_modules[\\/](?!@studiometa[\\/]).*/], type: 'javascript/auto', use: { loader: 'esbuild-loader', options: { loader: 'ts', target: isDev ? 'es2022' : 'es2020', - format: 'esm', }, }, }, From 45b6db9072afb0774d142fae3d407d7194e5703d Mon Sep 17 00:00:00 2001 From: Titouan Mathis Date: Thu, 7 Nov 2024 18:03:23 +0100 Subject: [PATCH 2/3] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 543f858..caad500 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +### Fixed + +- Fix CJS files being incorrectly transformed to ESM ([#172](https://github.com/studiometa/webpack-config/pull/172), [e4cccc2](https://github.com/studiometa/webpack-config/commit/e4cccc2)) + ## [v6.2.0](https://github.com/studiometa/webpack-config/compare/6.1.0..6.2.0) (2024-10-03) ### Added From ca6519d16fd5e0de2074c2462859de5694fa1df4 Mon Sep 17 00:00:00 2001 From: Titouan Mathis Date: Fri, 8 Nov 2024 16:30:32 +0100 Subject: [PATCH 3/3] Bump version number --- CHANGELOG.md | 2 ++ composer.json | 2 +- package-lock.json | 16 ++++++++-------- package.json | 2 +- packages/demo/package.json | 2 +- packages/preset-markdown/package.json | 2 +- packages/preset-prototyping/package.json | 2 +- packages/preset-vue-2/package.json | 2 +- packages/preset-vue-3/package.json | 2 +- packages/webpack-config/package.json | 2 +- 10 files changed, 18 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index caad500..da61359 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), ## [Unreleased] +## [v6.2.1](https://github.com/studiometa/webpack-config/compare/6.2.0..6.2.1) (2024-11-08) + ### Fixed - Fix CJS files being incorrectly transformed to ESM ([#172](https://github.com/studiometa/webpack-config/pull/172), [e4cccc2](https://github.com/studiometa/webpack-config/commit/e4cccc2)) diff --git a/composer.json b/composer.json index 53618e6..b696ede 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "studiometa/webpack-config", - "version": "6.2.0", + "version": "6.2.1", "description": "PHP Helpers for @studiometa/webpack-config", "type": "library", "require": { diff --git a/package-lock.json b/package-lock.json index dddd832..5975492 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@studiometa/webpack-config-root", - "version": "6.2.0", + "version": "6.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@studiometa/webpack-config-root", - "version": "6.2.0", + "version": "6.2.1", "workspaces": [ "packages/*" ], @@ -16019,7 +16019,7 @@ }, "packages/demo": { "name": "@studiometa/webpack-config-demo", - "version": "6.2.0", + "version": "6.2.1", "dependencies": { "@studiometa/js-toolkit": "^2.12.1", "@studiometa/ui": "^0.2.54", @@ -16509,7 +16509,7 @@ }, "packages/preset-markdown": { "name": "@studiometa/webpack-config-preset-markdown", - "version": "6.2.0", + "version": "6.2.1", "license": "MIT", "dependencies": { "front-matter-loader": "^2.0.0", @@ -16971,7 +16971,7 @@ }, "packages/preset-prototyping": { "name": "@studiometa/webpack-config-preset-prototyping", - "version": "6.2.0", + "version": "6.2.1", "license": "MIT", "dependencies": { "@studiometa/webpack-config-preset-markdown": "file:../preset-markdown", @@ -17018,7 +17018,7 @@ }, "packages/preset-vue-2": { "name": "@studiometa/webpack-config-preset-vue-2", - "version": "6.2.0", + "version": "6.2.1", "license": "MIT", "dependencies": { "lodash.merge": "^4.6.2", @@ -17098,7 +17098,7 @@ }, "packages/preset-vue-3": { "name": "@studiometa/webpack-config-preset-vue-3", - "version": "6.2.0", + "version": "6.2.1", "license": "MIT", "dependencies": { "@vue/compiler-sfc": "^3.5.10", @@ -17114,7 +17114,7 @@ }, "packages/webpack-config": { "name": "@studiometa/webpack-config", - "version": "6.2.0", + "version": "6.2.1", "license": "MIT", "dependencies": { "@soda/friendly-errors-webpack-plugin": "^1.8.1", diff --git a/package.json b/package.json index 7ee4e86..dfa60ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@studiometa/webpack-config-root", - "version": "6.2.0", + "version": "6.2.1", "private": true, "type": "module", "workspaces": [ diff --git a/packages/demo/package.json b/packages/demo/package.json index 2d00b2f..da732df 100644 --- a/packages/demo/package.json +++ b/packages/demo/package.json @@ -1,6 +1,6 @@ { "name": "@studiometa/webpack-config-demo", - "version": "6.2.0", + "version": "6.2.1", "private": true, "type": "module", "scripts": { diff --git a/packages/preset-markdown/package.json b/packages/preset-markdown/package.json index 5112649..1d7abdd 100644 --- a/packages/preset-markdown/package.json +++ b/packages/preset-markdown/package.json @@ -1,6 +1,6 @@ { "name": "@studiometa/webpack-config-preset-markdown", - "version": "6.2.0", + "version": "6.2.1", "publishConfig": { "access": "public" }, diff --git a/packages/preset-prototyping/package.json b/packages/preset-prototyping/package.json index 6503b36..4620a93 100644 --- a/packages/preset-prototyping/package.json +++ b/packages/preset-prototyping/package.json @@ -1,6 +1,6 @@ { "name": "@studiometa/webpack-config-preset-prototyping", - "version": "6.2.0", + "version": "6.2.1", "publishConfig": { "access": "public" }, diff --git a/packages/preset-vue-2/package.json b/packages/preset-vue-2/package.json index 62830e0..59908a7 100644 --- a/packages/preset-vue-2/package.json +++ b/packages/preset-vue-2/package.json @@ -1,6 +1,6 @@ { "name": "@studiometa/webpack-config-preset-vue-2", - "version": "6.2.0", + "version": "6.2.1", "publishConfig": { "access": "public" }, diff --git a/packages/preset-vue-3/package.json b/packages/preset-vue-3/package.json index 8cae736..9a7d110 100644 --- a/packages/preset-vue-3/package.json +++ b/packages/preset-vue-3/package.json @@ -1,6 +1,6 @@ { "name": "@studiometa/webpack-config-preset-vue-3", - "version": "6.2.0", + "version": "6.2.1", "publishConfig": { "access": "public" }, diff --git a/packages/webpack-config/package.json b/packages/webpack-config/package.json index a83bb04..4467ede 100644 --- a/packages/webpack-config/package.json +++ b/packages/webpack-config/package.json @@ -1,6 +1,6 @@ { "name": "@studiometa/webpack-config", - "version": "6.2.0", + "version": "6.2.1", "description": "A basic webpack config", "type": "module", "main": "src/index.js",