{"id":42269,"library":"vue-entry-loader","title":"vue-entry-loader","description":"Webpack loader that auto-generates Vue initialization code for .vue entry files, eliminating manual app creation for client and server-side rendering. Designed for easywebpack ecosystem, version 1.1.5 (latest, low activity). Differentiators: zero-config entry for SSR, automatic template injection with store/router hydration, and hook support. Maintained but infrequent updates.","status":"maintenance","version":"1.1.5","language":"javascript","source_language":"en","source_url":"https://github.com/hubcarl/vue-entry-loader","tags":["javascript","easyjs","easywebpack","webpack","vue","entry","loader","vue-entry-template"],"install":[{"cmd":"npm install vue-entry-loader","lang":"bash","label":"npm"},{"cmd":"yarn add vue-entry-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add vue-entry-loader","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This is a webpack loader, not a regular Node.js module. Configure it in webpack config under module.rules.","wrong":"const loader = require('vue-entry-loader')","symbol":"vue-entry-loader","correct":"module.exports = { module: { rules: [{ test: /\\.vue$/, loader: 'vue-entry-loader', options: { ... } }] } }"},{"note":"Loader is used in webpack configuration; no direct import in application code. Example shows loader chaining.","wrong":"import vueEntryLoader from 'vue-entry-loader';","symbol":"default export (loader function)","correct":"// webpack.config.js\nmodule.exports = { module: { rules: [{ test: /\\.vue$/, use: ['vue-loader', 'vue-entry-loader'] }] } }"},{"note":"Options passed via webpack rule options or loader query string. Complex config may require ejs template path.","wrong":"const options = { inject: true };","symbol":"options","correct":"configureLoader('vue-entry-loader', { inject: true, template: 'custom-template.ejs' })"}],"quickstart":{"code":"// webpack.config.js (CommonJS)\nconst path = require('path');\nmodule.exports = {\n  entry: {\n    main: './src/main.vue'  // direct .vue file as entry\n  },\n  output: {\n    path: path.resolve(__dirname, 'dist'),\n    filename: '[name].js'\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.vue$/,\n        use: [\n          'vue-loader',\n          {\n            loader: 'vue-entry-loader',\n            options: {\n              // enable auto initialization template\n              inject: true\n            }\n          }\n        ]\n      }\n    ]\n  },\n  resolve: {\n    extensions: ['.vue', '.js']\n  },\n  plugins: [\n    new VueLoaderPlugin()\n  ]\n};\n\n// Ensure vue-loader and vue-template-compiler are installed\n// npm install vue-loader vue-template-compiler --save-dev","lang":"javascript","description":"Webpack configuration to use vue-entry-loader for automatic Vue app initialization from .vue entry files."},"warnings":[{"fix":"Only use this loader on entry .vue files (e.g., via webpack entry config) and exclude from component rules using `include` or separate rules.","message":"vue-entry-loader modifies .vue file output by injecting initialization code; this breaks if .vue file is used as a component in other entries.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"For modern Vue SSR, consider using `vuex` and `vue-router` directly or migrate to vue-entry-loader alternatives.","message":"Dependence on `vuex-router-sync` for SSR; this package is no longer maintained and may cause issues with Vue 2.6+ or Vue 3.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Use Vue 2.x or use vue-loader for Vue 3; this loader is not compatible.","message":"Requires Vue 2.x; does not work with Vue 3. The injected template uses Vue.extend and options API.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set `inject: true` or provide a custom template via `template` option to enable auto-injection.","message":"The `inject` option defaults to `false`; without it, loader acts as pass-through and no initialization code is added.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check documentation for SSR integration; the loader-generated entry is used in a bundleRenderer or renderToString call.","message":"When using SSR, the loader exports a function that returns a Promise, not the Vue instance directly. This may confuse developers expecting server-entry.js pattern.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.1.5':34 'activ':37 'app':20 'auto':9 'auto-gener':8 'automat':45 'client':23 'code':13 'config':41 'creation':21 'design':29 'differenti':38 'easyj':59 'easywebpack':31,60 'ecosystem':32 'elimin':18 'entri':3,16,42,63,67 'file':17 'generat':10 'hook':52 'hydrat':50 'infrequ':56 'initi':12 'inject':47 'javascript':58 'latest':35 'loader':4,6,64 'low':36 'maintain':54 'manual':19 'render':28 'server':26 'server-sid':25 'side':27 'ssr':44 'store/router':49 'support':53 'templat':46,68 'updat':57 'version':33 'vue':2,11,15,62,66 'vue-entry-load':1 'vue-entry-templ':65 'webpack':5,61 'zero':40 'zero-config':39","created_at":"2026-06-04T18:56:26.650777+00:00","updated_at":"2026-06-04T18:56:26.650777+00:00","problems":[{"fix":"Run `npm install vue-entry-loader --save-dev` and ensure node_modules is in require path.","cause":"Missing dependency or incorrect path in webpack config.","error":"Error: Cannot find module 'vue-entry-loader'"},{"fix":"Install vue: `npm install vue --save`.","cause":"vue is not installed when using loader's injected code.","error":"Module not found: Error: Can't resolve 'vue' in '...'"},{"fix":"The loader injects `import Vue from 'vue';` automatically; ensure `vue` is resolvable and webpack is configured to handle ES modules.","cause":"Loader template uses Vue directly but it's not imported in the injected code.","error":"Uncaught ReferenceError: Vue is not defined"},{"fix":"Ensure your .vue file exports the router same way as store, or use a custom template that handles missing router gracefully.","cause":"Vue component does not export `router` function or object, but SSR template expects it.","error":"TypeError: Cannot read properties of undefined (reading 'router')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/hubcarl/vue-entry-loader#readme","github":"https://github.com/hubcarl/vue-entry-loader","docs":null,"changelog":null,"pypi":null,"npm":"vue-entry-loader","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}