Git Product home page Git Product logo

vite-vue2-starter's People

Contributors

antfu avatar herrmannplatz avatar idmytro avatar lstoeferle avatar qijizh avatar yuler avatar zhangyuhan2016 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vite-vue2-starter's Issues

Missing dependencies: vue-demi (using pnpm)

Dear @lstoeferle, I've tried to run your project locally but gets into problem.

Here are the steps of what I've done:

  • git clone lstoeferle/vite-vue2-windicss-starter
  • pnpm install
  • pnpm run dev

Here are the error:

> [email protected] dev E:\Data\Projects\testing\vue-test\vite-vue2-windicss-starter
> vite

error when starting dev server:
Error: The following dependencies are imported but could not be resolved:

  vue-demi (imported by E:/Data/Projects/testing/vue-test/vite-vue2-windicss-starter/src/main.ts)

Are they installed?
    at optimizeDeps (E:\Data\Projects\testing\vue-test\vite-vue2-windicss-starter\node_modules\.pnpm\[email protected]\node_modules\vite\dist\node\chunks\dep-00e79b84.js:67615:15)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async runOptimize (E:\Data\Projects\testing\vue-test\vite-vue2-windicss-starter\node_modules\.pnpm\[email protected]\node_modules\vite\dist\node\chunks\dep-00e79b84.js:68170:48)
    at async Server.httpServer.listen (E:\Data\Projects\testing\vue-test\vite-vue2-windicss-starter\node_modules\.pnpm\[email protected]\node_modules\vite\dist\node\chunks\dep-00e79b84.js:68184:17)
 ERROR  Command failed with exit code 1.

Looks like vue-demi is missing from package.json.

Regards,

Martinus

Env variables availability

I have a weird issue where env variables are available in my App.vue file but when importing other components for App.vue the env variables give undefined in those components.

Couldn't find anything related on SO or Google. Could it have anything to do with how it's implemented in this template?

I must say I'm new to Typescript and Vite as a whole but any tips?

Also thank you very much for this template! Already learned a ton with it!

The class of the container that wraps the Feature component is not set correctly

In the Commits on Mar 27, 2021(7c3c055600d5c43156ae720f0add52a62398791e)

Incorrect spacing between Feature components ( Features.vue ).

      <div class="w-full py-4 pr-4 xs:pl-4 md:w-1/2 lg:w-1/4">
        <Feature
          title="vite-plugin-vue2"
          text="Vue 2 support for Vite"
          url="https://github.com/underfin/vite-plugin-vue2"
        />
      </div>
      <div class="w-full p-4 md:w-1/2 lg:w-1/4">
        <Feature
          title="vite-plugin-components"
          text="On demand components auto importing for Vite"
          url="https://github.com/antfu/vite-plugin-components"
        />
      </div>

I don't know if the author did it on purpose.

I guess I should write it this way——

      <div class="w-full py-4 px-2 xs:pr-4 md:w-1/2 lg:w-1/4">
        <Feature
          title="vite-plugin-vue2"
          text="Vue 2 support for Vite"
          url="https://github.com/underfin/vite-plugin-vue2"
        />
      </div>
      <div class="w-full py-4 px-2 xs:pr-4 md:w-1/2 lg:w-1/4">
        <Feature
          title="vite-plugin-components"
          text="On demand components auto importing for Vite"
          url="https://github.com/antfu/vite-plugin-components"
        />
      </div>

Live demo

Hi @lstoeferle, I pulled it down and get it running. I'd say I am really impressed by the template layouts and the code structure. I think it will be great for people to have a quick preview of it if you can deploy it as a live demo. 👍

I wannt to change it to multi-page app,but get 404 .

my vite config according vite docs

import path from 'path'
import { defineConfig } from 'vite'
import { createVuePlugin as Vue2 } from 'vite-plugin-vue2'
import WindiCSS from 'vite-plugin-windicss'
import Components from 'unplugin-vue-components/vite'
import Icons from 'unplugin-icons/vite'
import IconsResolver from 'unplugin-icons/resolver'
import ScriptSetup from 'unplugin-vue2-script-setup/vite'
import AutoImport from 'unplugin-auto-import/vite'

const root = path.resolve(__dirname, 'src')
const outDir = path.resolve(__dirname, 'dist')

const config = defineConfig({
  // root,
  resolve: {
    alias: {
      '@': `${path.resolve(__dirname, 'src')}`,
    },
    dedupe: ['vue-demi'],
  },

  build: {
    // outDir,
    minify: true,
    rollupOptions: {
      input: {
        main: path.resolve(__dirname, 'index.html'),
        about: path.resolve(__dirname, 'about', 'index.html'),
      },
    },
  },

  plugins: [
    Vue2(),
    ScriptSetup(),
    WindiCSS(),
    Components({
      resolvers: [
        IconsResolver({
          componentPrefix: '',
        }),
      ],
      dts: 'src/components.d.ts',
    }),
    Icons(),
    AutoImport({
      imports: ['@vue/composition-api', 'vue-router', '@vueuse/core'],
      dts: 'src/auto-imports.d.ts',
    }),
  ],

  server: {
    port: 3333,
  },
})

export default config

image

open about path :http://localhost:3333/about it is 404.

How can i fix it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.