File tree Expand file tree Collapse file tree 6 files changed +55
-24
lines changed
Expand file tree Collapse file tree 6 files changed +55
-24
lines changed Original file line number Diff line number Diff line change 102102 "gettext-extractor" : " ^3.6.0" ,
103103 "gettext-parser" : " ^6.0.0" ,
104104 "jsdom" : " ^20.0.3" ,
105- "rollup-plugin-inject-process- env" : " ^1.3.1 " ,
105+ "rollup-plugin-baked- env" : " ^1.0.0 " ,
106106 "rollup-plugin-node-externals" : " ^5.0.2" ,
107107 "sanitize-filename" : " ^1.6.3" ,
108108 "sass" : " ^1.56.2" ,
109109 "vite" : " ^4.0.0" ,
110- "vitest" : " ^0.25.7" ,
111110 "vitepress" : " ^1.0.0-alpha.31" ,
111+ "vitest" : " ^0.25.7" ,
112112 "vue-docgen-cli" : " ^4.56.1" ,
113113 "vue-eslint-parser" : " ^9.1.0" ,
114114 "vue-live" : " ^2.3.2"
Original file line number Diff line number Diff line change @@ -238,7 +238,8 @@ import NcListItemIcon from '../NcListItemIcon/index.js'
238238import NcLoadingIcon from ' ../NcLoadingIcon/index.js'
239239import Tooltip from ' ../../directives/Tooltip/index.js'
240240import l10n from ' ../../mixins/l10n.js'
241-
241+ // eslint-disable-next-line import/no-unresolved, node/no-missing-import
242+ import { SCOPE_VERSION } from ' process.env'
242243import { Multiselect as VueMultiselect } from ' vue-multiselect'
243244
244245export default {
@@ -364,7 +365,7 @@ export default {
364365 return {
365366 elWidth: 0 ,
366367 ariaExpanded: false ,
367- scoping: { [` data-v-${ process . env . SCOPE_VERSION } ` ]: ' ' },
368+ scoping: { [` data-v-${ SCOPE_VERSION } ` ]: ' ' },
368369 }
369370 },
370371 computed: {
Original file line number Diff line number Diff line change 11import { getGettextBuilder } from '@nextcloud/l10n/dist/gettext.js'
2+ // eslint-disable-next-line import/no-unresolved, node/no-missing-import
3+ import { TRANSLATIONS } from 'process.env'
24
35const gtBuilder = getGettextBuilder ( )
46 . detectLocale ( )
57
68// Decompress Translations to gettext format and add to gtBuilder
7- if ( Array . isArray ( process . env . TRANSLATIONS ) ) {
8- process . env . TRANSLATIONS . forEach ( ( lang ) => {
9+ if ( Array . isArray ( TRANSLATIONS ) ) {
10+ TRANSLATIONS . forEach ( ( lang ) => {
911 const translations = { }
1012
1113 for ( const key in lang . translations ) {
Original file line number Diff line number Diff line change 1919 * along with this program. If not, see <http://www.gnu.org/licenses/>.
2020 *
2121 */
22+ // eslint-disable-next-line import/no-unresolved, node/no-missing-import
23+ import { SCOPE_VERSION } from 'process.env'
2224
2325const ScopeComponent = ( Component ) => {
2426 // Init mounted vue if none
@@ -30,7 +32,7 @@ const ScopeComponent = (Component) => {
3032
3133 // Inject root scoping function
3234 Component . mounted . push ( function ( ) {
33- this . $el . setAttribute ( `data-v-${ process . env . SCOPE_VERSION } ` , '' )
35+ this . $el . setAttribute ( `data-v-${ SCOPE_VERSION } ` , '' )
3436 } )
3537}
3638
Original file line number Diff line number Diff line change 11import md5 from 'md5'
22import vue from '@vitejs/plugin-vue'
3- import { externals } from 'rollup-plugin-node-externals'
43import browserslistToEsbuild from 'browserslist-to-esbuild'
5- import injectProcessEnv from 'rollup-plugin-inject-process-env'
4+ import bakedEnv from 'rollup-plugin-baked-env'
5+ import { externals } from 'rollup-plugin-node-externals'
66import { loadTranslations } from './resources/translations.mjs'
77import { fileURLToPath , URL } from 'url'
88import { dirname , resolve } from 'path'
@@ -66,7 +66,7 @@ export default defineConfig({
6666 rollupOptions : {
6767 plugins : [
6868 externals ( ) ,
69- injectProcessEnv ( processEnvironment ) ,
69+ bakedEnv ( processEnvironment ) ,
7070 ] ,
7171 external : [
7272 ...Object . keys ( loadJSON ( './package.json' ) . peerDependencies ) ,
You can’t perform that action at this time.
0 commit comments