nuxt-runtime-compiler

A simple module enabling the vue full bundle on Nuxt 2 and 3
3,649 18
Install
npm install nuxt-runtime-compiler
Latest Version:1.3.0
Vue:3
License:MIT
Last Updated:May 17, 2023
Links: GitHub  ·  npm
Maintainer: huang-julien

nuxt-runtime-compiler

A simple module to enable vue runtime bundle on Nuxt 2 and 3

:rocket: Runtime bundle can now be enabled in Nuxt 3.4 with experimental.runtimeVueCompiler and vue.runtimeCompiler in Nuxt 3.5 .

Configuration

Add the module to nuxt config file:

nuxt.config.ts

export default defineNuxtConfig({
    modules: ['nuxt-runtime-compiler']
})

Options

The module has some options built-in


interface NuxtRuntimeCompilerOptions {
  nodeModulesRoot?: string
}

nodeModulesRoot

You can specify the node_modules root directory if your node_modules directory is not at your process.cwd().

  • Default value is ./

For example if you are running nuxt build from a project in root/packages/{YOUR_WORKSPACE} while your node_modules is in root/ then the nodeModulesRoot should be


export default defineNuxtConfig({
    modules: ['nuxt-runtime-compiler', {
        nodeModulesRoot: "../../"
    }]
})

RuntimeCompilerOptions

See app.config documentation This module overloads the AppConfig exported by app.config.ts to pass the RuntimeCompilerOptions to your VueApp in runtime.

Compatible options from RuntimeCompilerOptions in app.config will also be used by the builder during build time.

app.config.ts

export default defineAppConfig({
  vue: {
    compilerOptions: {
      isCustomElement: (tag) => {
        return [
          'math',
          'maction',
        ].includes(tag)
      }
    }
  }
})

Related Packages

@thunderid/nuxt

Nuxt SDK for ThunderID

6,771 7
nuxt-seo-meta

nuxtjs seo meta generator

1,378 43
nuxtjs-sitemap-firebase-header

Automatically generate or serve dynamic sitemap.xml for Nuxt projects

901 689
nuxt-resolve-url-loader

Nuxt module for adding resolve-url-loader to webpack config.

2,284 1
@nuxtjs/redirect-module

Nuxt module to dynamically redirect initial requests

248,427 307

Version History

Version Released Vue License
1.3.0 ^3.0 MIT
1.2.2 ^3.0 MIT
1.2.1 ^3.0 MIT
1.2.0 ^3.0 MIT
1.1.3 ^3.0 MIT