@@ -26,9 +26,6 @@ function __vue2_injectStyles (context) {
2626 }
2727}
2828
29- __component__.options.fluent = __component__.options.fluent || { } ;
30- __component__.options.fluent['en'] = en_ftl
31- __component__.options.fluent['da'] = da_ftl
3229__component__.options.__file = \\ "fixtures/components/external.vue\\ "
3330/* hot reload */
3431import __VUE_HMR_RUNTIME__ from \\ "/@id/__x00__/vite/vueHotReload\\ "
@@ -45,6 +42,41 @@ if(!import.meta.env.SSR && __VUE_HMR_RUNTIME__.compatible){
4542 __VUE_HMR_RUNTIME__ .rerender (\\" 4c0553ad\\ " , update )
4643 })
4744}
45+ __component__.fluent = __component__.fluent || { } ;
46+ __component__.fluent['en'] = en_ftl
47+ __component__.fluent['da'] = da_ftl
48+ export default /*#__PURE__*/(function () { return __component__ .exports } )()"
49+ ` ;
50+
51+ exports [` external ftl file support > works with vue 2 in production 1` ] = `
52+ "import da_ftl from '/fixtures/ftl/da/components/external.vue.ftl?import';
53+ import en_ftl from '/fixtures/ftl/en/components/external.vue.ftl?import';
54+ const __vue2_script = { }
55+ import { render as __vue2_render , staticRenderFns as __vue2_staticRenderFns } from \\ "/fixtures/components/external.vue?vue& type=template& lang.js\\ "
56+ const __cssModules = { }
57+
58+ /* normalize component */
59+ import __vue2_normalizer from \\ "/@id/__x00__/vite/vueComponentNormalizer\\ "
60+ var __component__ = /*#__PURE__*/__vue2_normalizer(
61+ __vue2_script,
62+ __vue2_render,
63+ __vue2_staticRenderFns,
64+ false,
65+ __vue2_injectStyles,
66+ null,
67+ null,
68+ null
69+ )
70+
71+ function __vue2_injectStyles (context) {
72+ for (let o in __cssModules ){
73+ this[o] = __cssModules[o]
74+ }
75+ }
76+
77+ __component__.fluent = __component__.fluent || { } ;
78+ __component__.fluent['en'] = en_ftl
79+ __component__.fluent['da'] = da_ftl
4880export default /*#__PURE__*/(function () { return __component__ .exports } )()"
4981` ;
5082
@@ -62,9 +94,6 @@ function _sfc_render(_ctx, _cache) {
6294}
6395
6496
65- _sfc_main.fluent = _sfc_main.fluent || { } ;
66- _sfc_main.fluent['en'] = en_ftl
67- _sfc_main.fluent['da'] = da_ftl
6897_sfc_main.__hmrId = \\ "4c0553ad\\ "
6998typeof __VUE_HMR_RUNTIME__ !== 'undefined' && __VUE_HMR_RUNTIME__.createRecord(_sfc_main.__hmrId, _sfc_main)
7099import.meta.hot.accept(({ default : updated , _rerender_only } ) => {
@@ -75,21 +104,58 @@ import.meta.hot.accept(({ default: updated, _rerender_only }) => {
75104 }
76105} )
77106import _export_sfc from '/@id/plugin-vue:export-helper'
107+ _sfc_main.fluent = _sfc_main.fluent || { } ;
108+ _sfc_main.fluent['en'] = en_ftl
109+ _sfc_main.fluent['da'] = da_ftl
78110export default /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render],['__file',\\ "/home/demivan/projects/fluent/rollup-plugin-fluent-vue/__tests__/fixtures/components/external.vue\\ "]])"
79111` ;
80112
113+ exports [` external ftl file support > works with vue 3 in production 1` ] = `
114+ "import da_ftl from '/fixtures/ftl/da/components/external.vue.ftl?import';
115+ import en_ftl from '/fixtures/ftl/en/components/external.vue.ftl?import';
116+ const _sfc_main = { }
117+ import { toDisplayString as _toDisplayString , createElementVNode as _createElementVNode , openBlock as _openBlock , createElementBlock as _createElementBlock } from \\ "/@id/vue\\ "
118+
119+ function _sfc_render(_ctx, _cache) {
120+ return (_openBlock (), _createElementBlock (\\" div\\ " , null , [
121+ _createElementVNode (\\" div\\ " , null , _toDisplayString (_ctx .$t (' hello-user' , { userName: _ctx .userName })), 1 /* TEXT */ ),
122+ _createElementVNode (\\" div\\ " , null , _toDisplayString (_ctx .$t (' shared-photos' , { userName: _ctx .userName , photoCount: _ctx .photoCount , userGender: _ctx .userGender })), 1 /* TEXT */ )
123+ ]))
124+ }
125+
126+
127+ import _export_sfc from '/@id/plugin-vue:export-helper'
128+ _sfc_main.fluent = _sfc_main.fluent || { } ;
129+ _sfc_main.fluent['en'] = en_ftl
130+ _sfc_main.fluent['da'] = da_ftl
131+ export default /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render]])"
132+ ` ;
133+
81134exports [` external ftl file support > works with vue 3 rollup plugin 1` ] = `
82135"import da_ftl from '/fixtures/ftl/da/components/external.vue.ftl?import';
83136import en_ftl from '/fixtures/ftl/en/components/external.vue.ftl?import';
84137const script = { }
85- import { render } from \\ "/fixtures/components/external.vue?vue& type=template& id=8d0ca2ca& lang.js\\ "
138+ import { render } from \\ "/fixtures/components/external.vue?vue& type=template& id=1e181a1e& lang.js\\ "
139+
140+
141+ script.render = render
142+ script.fluent = script.fluent || { } ;
143+ script.fluent['en'] = en_ftl
144+ script.fluent['da'] = da_ftl
145+ export default script"
146+ ` ;
147+
148+ exports [` external ftl file support > works with vue 3 rollup plugin in production 1` ] = `
149+ "import da_ftl from '/fixtures/ftl/da/components/external.vue.ftl?import';
150+ import en_ftl from '/fixtures/ftl/en/components/external.vue.ftl?import';
151+ const script = { }
152+ import { render } from \\ "/fixtures/components/external.vue?vue& type=template& id=1e181a1e& lang.js\\ "
86153
87154
88155script.render = render
89156script.fluent = script.fluent || { } ;
90157script.fluent['en'] = en_ftl
91158script.fluent['da'] = da_ftl
92- script.__file = \\ "__tests__/fixtures/components/external.vue\\ "
93159export default script"
94160` ;
95161
@@ -117,8 +183,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
117183}
118184
119185
120- _sfc_main.fluent = _sfc_main.fluent || { } ;
121- _sfc_main.fluent['en'] = en_ftl
122186_sfc_main.__hmrId = \\ "f4d31108\\ "
123187typeof __VUE_HMR_RUNTIME__ !== 'undefined' && __VUE_HMR_RUNTIME__.createRecord(_sfc_main.__hmrId, _sfc_main)
124188import.meta.hot.accept(({ default : updated , _rerender_only } ) => {
@@ -129,5 +193,7 @@ import.meta.hot.accept(({ default: updated, _rerender_only }) => {
129193 }
130194} )
131195import _export_sfc from '/@id/plugin-vue:export-helper'
196+ _sfc_main.fluent = _sfc_main.fluent || { } ;
197+ _sfc_main.fluent['en'] = en_ftl
132198export default /*#__PURE__*/_export_sfc(_sfc_main, [['render',_sfc_render],['__file',\\ "/home/demivan/projects/fluent/rollup-plugin-fluent-vue/__tests__/fixtures/components/external.setup.vue\\ "]])"
133199` ;
0 commit comments