Skip to content

Commit a7fdbf8

Browse files
committed
bug #1268 Remove "type": "module" from all package.json files (smnandre)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- Remove "type": "module" from all package.json files Since #1264, another person could not build its assets with Encore and a babel plugin. So for now we decided to revert the "type: module" declaration. ### Revert the "type: module" Remove this "type" line from all package.json files and revert replacing "main:" with "module:" Before ```json "type": "module", "module": "dist/foo.js", ``` After ```json "main": "dist/foo.js", ``` ### Fix Svelte ESM bug with vite/vitest ``` We recommend converting your config to ESM by either: adding "type": "module" to the nearest package.json renaming vite.config.js/vite.config.ts to vite.config.mjs/vite.config.mts ``` (https://vitejs.dev/guide/troubleshooting.html#config) So i used the second one.... and it seems to work Commits ------- 919ade7 Remove "type": "module" from all package.json files
2 parents d4e3f0a + 919ade7 commit a7fdbf8

File tree

33 files changed

+80
-31
lines changed

33 files changed

+80
-31
lines changed

src/Autocomplete/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add new BaseEntityAutocompleteType

src/Autocomplete/assets/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"name": "@symfony/ux-autocomplete",
33
"description": "JavaScript-powered autocompletion functionality for forms.",
4-
"module": "dist/controller.js",
5-
"type": "module",
4+
"main": "dist/controller.js",
65
"types": "dist/controller.d.ts",
76
"version": "1.0.0",
87
"license": "MIT",

src/Chartjs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

src/Chartjs/assets/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Chart.js integration for Symfony",
44
"license": "MIT",
55
"version": "1.1.0",
6-
"module": "dist/controller.js",
6+
"main": "dist/controller.js",
77
"types": "dist/controller.d.ts",
88
"symfony": {
99
"controllers": {

src/Cropperjs/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

src/Cropperjs/assets/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Cropper.js integration for Symfony",
44
"license": "MIT",
55
"version": "1.1.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"config": {
109
"css_source": "src/style.css"

src/Dropzone/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

src/Dropzone/assets/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "File input dropzones for Symfony Forms",
44
"license": "MIT",
55
"version": "1.1.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"config": {
109
"css_source": "src/style.css"

src/LazyImage/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 2.13.2
4+
5+
- Revert "Change JavaScript package to `type: module`"
6+
37
## 2.13.0
48

59
- Add Symfony 7 support.

src/LazyImage/assets/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
"description": "Lazy image loader and utilities for Symfony",
44
"license": "MIT",
55
"version": "1.1.0",
6-
"module": "dist/controller.js",
7-
"type": "module",
6+
"main": "dist/controller.js",
87
"types": "dist/controller.d.ts",
98
"symfony": {
109
"controllers": {

0 commit comments

Comments
 (0)