@@ -514,6 +514,9 @@ npm i json-editor-vue vanilla-jsoneditor
514514
515515export default {
516516 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' ],
517520 extend(config ) {
518521 // Getting webpack to recognize the `.mjs` file
519522 config .module .rules .push ({
@@ -555,6 +558,9 @@ const value = ref()
555558export default {
556559 plugins: [' ~/plugins/JsonEditorVue.client' ],
557560 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' ],
558564 extend(config ) {
559565 // Getting webpack to recognize the `.mjs` file
560566 config .module .rules .push ({
@@ -607,6 +613,9 @@ npm i json-editor-vue vanilla-jsoneditor @vue/composition-api
607613
608614export default {
609615 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' ],
610619 extend(config ) {
611620 // Getting webpack to recognize the `.mjs` file
612621 config .module .rules .push ({
@@ -657,6 +666,9 @@ export default {
657666export default {
658667 plugins: [' ~/plugins/JsonEditorVue.client' ],
659668 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' ],
660672 extend(config ) {
661673 // Getting webpack to recognize the `.mjs` file
662674 config .module .rules .push ({
@@ -716,14 +728,14 @@ Ready to use right out of the box.
716728
717729### Vue CLI 4 (webpack 4)
718730
719- Vite 4 (Rollup 3) uses ES2020 as compiler target by default, therefore Vite-4-built outputs should be transpiled in webpack 4.
720-
721731≥ v4.5.15
722732
723733``` js
724734// vue.config.js
725735
726736module .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
727739 transpileDependencies: [' json-editor-vue' ],
728740}
729741```
@@ -734,6 +746,8 @@ module.exports = {
734746// vue.config.js
735747
736748module .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
737751 transpileDependencies: [' json-editor-vue' ],
738752 configureWebpack: {
739753 module: {
@@ -754,8 +768,6 @@ module.exports = {
754768
755769### Vue CLI 3 (webpack 4)
756770
757- Vite 4 (Rollup 3) uses ES2020 as compiler target by default, therefore Vite-4-built outputs should be transpiled in webpack 4.
758-
759771``` shell
760772npm i @babel/plugin-proposal-nullish-coalescing-operator @babel/plugin-proposal-optional-chaining -D
761773```
@@ -775,6 +787,8 @@ module.exports = {
775787// vue.config.js
776788
777789module .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
778792 transpileDependencies: [' json-editor-vue' ],
779793 chainWebpack (config ) {
780794 // Getting webpack to recognize the `.mjs` file
0 commit comments