@@ -514,6 +514,9 @@ npm i json-editor-vue vanilla-jsoneditor
514
514
515
515
export default {
516
516
build: {
517
+ // Vite 4 (Rollup 3) uses ES2020 as compiler target by default
518
+ // Therefore Vite-4-built outputs should be transpiled in webpack 4
519
+ transpile: [' json-editor-vue' ],
517
520
extend(config ) {
518
521
// Getting webpack to recognize the `.mjs` file
519
522
config .module .rules .push ({
@@ -555,6 +558,9 @@ const value = ref()
555
558
export default {
556
559
plugins: [' ~/plugins/JsonEditorVue.client' ],
557
560
build: {
561
+ // Vite 4 (Rollup 3) uses ES2020 as compiler target by default
562
+ // Therefore Vite-4-built outputs should be transpiled in webpack 4
563
+ transpile: [' json-editor-vue' ],
558
564
extend(config ) {
559
565
// Getting webpack to recognize the `.mjs` file
560
566
config .module .rules .push ({
@@ -607,6 +613,9 @@ npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
607
613
608
614
export default {
609
615
build: {
616
+ // Vite 4 (Rollup 3) uses ES2020 as compiler target by default
617
+ // Therefore Vite-4-built outputs should be transpiled in webpack 4
618
+ transpile: [' json-editor-vue' ],
610
619
extend(config ) {
611
620
// Getting webpack to recognize the `.mjs` file
612
621
config .module .rules .push ({
@@ -657,6 +666,9 @@ export default {
657
666
export default {
658
667
plugins: [' ~/plugins/JsonEditorVue.client' ],
659
668
build: {
669
+ // Vite 4 (Rollup 3) uses ES2020 as compiler target by default
670
+ // Therefore Vite-4-built outputs should be transpiled in webpack 4
671
+ transpile: [' json-editor-vue' ],
660
672
extend(config ) {
661
673
// Getting webpack to recognize the `.mjs` file
662
674
config .module .rules .push ({
@@ -716,14 +728,14 @@ Ready to use right out of the box.
716
728
717
729
### Vue CLI 4 (webpack 4)
718
730
719
- Vite 4 (Rollup 3) uses ES2020 as compiler target by default, therefore Vite-4-built outputs should be transpiled in webpack 4.
720
-
721
731
≥ v4.5.15
722
732
723
733
``` js
724
734
// vue.config.js
725
735
726
736
module .exports = {
737
+ // Vite 4 (Rollup 3) uses ES2020 as compiler target by default
738
+ // Therefore Vite-4-built outputs should be transpiled in webpack 4
727
739
transpileDependencies: [' json-editor-vue' ],
728
740
}
729
741
```
@@ -734,6 +746,8 @@ module.exports = {
734
746
// vue.config.js
735
747
736
748
module .exports = {
749
+ // Vite 4 (Rollup 3) uses ES2020 as compiler target by default
750
+ // Therefore Vite-4-built outputs should be transpiled in webpack 4
737
751
transpileDependencies: [' json-editor-vue' ],
738
752
configureWebpack: {
739
753
module: {
@@ -754,8 +768,6 @@ module.exports = {
754
768
755
769
### Vue CLI 3 (webpack 4)
756
770
757
- Vite 4 (Rollup 3) uses ES2020 as compiler target by default, therefore Vite-4-built outputs should be transpiled in webpack 4.
758
-
759
771
``` shell
760
772
npm i @babel/plugin-proposal-nullish-coalescing-operator @babel/plugin-proposal-optional-chaining -D
761
773
```
@@ -775,6 +787,8 @@ module.exports = {
775
787
// vue.config.js
776
788
777
789
module .exports = {
790
+ // Vite 4 (Rollup 3) uses ES2020 as compiler target by default
791
+ // Therefore Vite-4-built outputs should be transpiled in webpack 4
778
792
transpileDependencies: [' json-editor-vue' ],
779
793
chainWebpack (config ) {
780
794
// Getting webpack to recognize the `.mjs` file
0 commit comments