├── pnpm-workspace.yaml ├── index.d.ts ├── playground ├── custom │ ├── custom.json │ └── TestCustomBlock.vue ├── css │ ├── testCssModules.module.css │ ├── TestEmptyCss.vue │ ├── TestScopedCss.vue │ └── TestCssModules.vue ├── src-import │ ├── style.css │ ├── TestBlockSrcImport.vue │ ├── script.ts │ ├── template.html │ └── TestMultiplySrcImport.vue ├── public │ └── favicon.ico ├── TestTsSFC.vue ├── main.js ├── test-assets │ ├── nested │ │ └── testAssets.png │ └── TestAssets.vue ├── TestJsx.tsx ├── shims.d.ts ├── TestJsxSFC.vue ├── TestDecorator.tsx ├── index.html ├── hmr │ └── TestHmr.vue ├── package.json ├── tsconfig.json ├── vite.config.ts ├── TestES2020Features.vue └── App.vue ├── .prettierrc ├── .gitignore ├── jest.config.js ├── src ├── utils │ ├── css.ts │ ├── error.ts │ ├── query.ts │ ├── descriptorCache.ts │ ├── rewriteDefault.ts │ ├── componentNormalizer.ts │ └── vueHotReload.ts ├── jsxTransform.ts ├── style.ts ├── template │ ├── types.ts │ ├── assetUrl.ts │ ├── srcset.ts │ ├── utils.ts │ └── compileTemplate.ts ├── template.ts ├── hmr.ts ├── index.ts └── main.ts ├── .eslintrc ├── tsconfig.json ├── test ├── unit.spec.ts ├── util.ts └── e2e.spec.ts ├── .github └── workflows │ └── ci.yml ├── README.MD ├── package.json └── CHANGELOG.md /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - playground 3 | -------------------------------------------------------------------------------- /index.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'vue-template-babel-compiler' 2 | -------------------------------------------------------------------------------- /playground/custom/custom.json: -------------------------------------------------------------------------------- 1 | { 2 | "customSrc": "Custom Block" 3 | } 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "singleQuote": true, 4 | "printWidth": 80 5 | } -------------------------------------------------------------------------------- /playground/css/testCssModules.module.css: -------------------------------------------------------------------------------- 1 | .turquoise { 2 | color: rgb(255, 140, 0); 3 | } 4 | -------------------------------------------------------------------------------- /playground/src-import/style.css: -------------------------------------------------------------------------------- 1 | .src-imports-style { 2 | color: rgb(119, 136, 153); 3 | } 4 | -------------------------------------------------------------------------------- /playground/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/underfin/vite-plugin-vue2/HEAD/playground/public/favicon.ico -------------------------------------------------------------------------------- /playground/TestTsSFC.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | *.local 5 | yarn-error.log 6 | .idea/ 7 | .history/ 8 | .vscode 9 | temp 10 | -------------------------------------------------------------------------------- /playground/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | new Vue({ 5 | render: h => h(App), 6 | }).$mount('#app') 7 | -------------------------------------------------------------------------------- /playground/test-assets/nested/testAssets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/underfin/vite-plugin-vue2/HEAD/playground/test-assets/nested/testAssets.png -------------------------------------------------------------------------------- /playground/TestJsx.tsx: -------------------------------------------------------------------------------- 1 | const word = 'JSX works!' 2 | 3 | export default { 4 | render() { 5 | return
15 |
16 | HMR: click button and edit template part of ./TestHmr.vue,
17 | count should not reset
18 |
19 |
22 |
22 | {{ custom }} 23 |
24 |25 | {{ customLang }} 26 |
27 |28 | {{ customSrc }} 29 |
30 |
17 | Path for assets import from js: {{ filepath }}
18 |
20 | Relative asset reference in template:
21 |
22 |
24 | Alias asset reference in template:
25 |
26 |
28 | Absolute asset reference in template:
29 |
30 |
32 | Absolute asset reference without protocol header in the template:
33 |
34 |
33 | [nullish.a.b.c.d ?? 'not found']
34 |
35 | //returns {{ nullish.a.d?.e ?? 'not found' }}
36 |
37 |
38 | [nullish.a.b.c ?? 'not found']
39 |
40 | //returns {{ nullish.a.b.c ?? 'not found' }}
41 |
42 |
44 | ["Test", 1, ...('abc').split('')]
45 |
46 | //returns {{ ['Test', 1, ...'abc'.split('')] }}
47 |
48 |