Skip to content

Commit 89ea2de

Browse files
committed
fix: opt in to import.meta.* properties
1 parent 93982b7 commit 89ea2de

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
"globby": "^14.0.0",
105105
"happy-dom": "^13.4.1",
106106
"lint-staged": "^15.2.2",
107+
"lodash-es": "^4.17.21",
107108
"minimist": "^1.2.8",
108109
"p-series": "^3.0.0",
109110
"prettier": "^3.2.5",

packages/nuxt/src/module.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { readFileSync } from 'node:fs'
2+
import { template } from 'lodash-es'
13
/**
24
* @module nuxt-vuefire
35
*/
@@ -169,7 +171,10 @@ export default defineNuxtModule<VueFireNuxtModuleOptions>({
169171

170172
// this adds the VueFire plugin and handle SSR state serialization and hydration
171173
addPluginTemplate({
172-
src: normalize(resolve(templatesDir, 'plugin.ejs')),
174+
getContents({ options }) {
175+
const contents = readFileSync(normalize(resolve(templatesDir, 'plugin.ejs')), 'utf-8')
176+
return template(contents)({ options })
177+
},
173178
filename: 'vuefire-plugin.mjs',
174179
options: {
175180
ssr: nuxt.options.ssr,

pnpm-lock.yaml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)