pearone / vite-plugin-monaco-editor-nls

vite plugin Monaco editor localize
29 stars 19 forks source link

MonacoEditorNlsPlugin is not a function , in VIte4 #11

Open laterdayi opened 1 year ago

laterdayi commented 1 year ago

MonacoEditorNlsPlugin is not a function , i in VIte4

shaoerkuai commented 6 months ago
export default defineConfig({
    plugins: [MonacoEditorNlsPlugin.default({
        locale: Languages.zh_hans,
    }), vue(), AutoImport({
        imports: ['vue', 'vue-router']
    })], optimizeDeps: {
        /** vite >= 2.3.0 */
        esbuildOptions: {
            plugins: [
                esbuildPluginMonacoEditorNls({
                    locale: Languages.zh_hans,
                }),
            ],
        },
    },
})

目前写法是未命名函数,所以使用.default即可,我提了个pr给他修复掉。