Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: switched to vite. todo: vite should support css.extract=false
- Loading branch information
Showing
10 changed files
with
101 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<title>vue-at</title> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Demo: vue-at</title> | ||
</head> | ||
<body> | ||
<div id="app"></div> | ||
<script src="dist/demo.js"></script> | ||
<script type="module" src="/src/main.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// https://vueschool.io/articles/vuejs-tutorials/how-to-migrate-from-vue-cli-to-vite/ | ||
// vue2 | ||
// import { createVuePlugin as vue } from 'vite-plugin-vue2' | ||
// vue3 | ||
import vue from '@vitejs/plugin-vue' | ||
|
||
// todo: vite should support css.extract=false | ||
// pending https://github.com/vitejs/vite/issues/4345 | ||
|
||
export default { | ||
plugins: [vue()], | ||
build: { | ||
emptyOutDir: false, | ||
rollupOptions: { | ||
// make sure to externalize deps that shouldn't be bundled | ||
// into your library | ||
external: ['vue'], | ||
output: { | ||
// Provide global variables to use in the UMD build | ||
// for externalized deps | ||
globals: { | ||
vue: 'Vue' | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { defineConfig } from 'vite' | ||
import { resolve } from 'path' | ||
import commonConfig from './vite.config.0' | ||
|
||
export default defineConfig({ | ||
...commonConfig, | ||
build: { | ||
...commonConfig.build, | ||
lib: { | ||
entry: resolve(__dirname, 'src/At.vue'), | ||
name: 'VueAt', | ||
fileName: 'vue-at', | ||
formats: ['cjs', 'es', 'umd'] | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { defineConfig } from 'vite' | ||
import { resolve } from 'path' | ||
import commonConfig from './vite.config.0' | ||
|
||
export default defineConfig({ | ||
...commonConfig, | ||
build: { | ||
...commonConfig.build, | ||
lib: { | ||
entry: resolve(__dirname, 'src/AtTextarea.vue'), | ||
name: 'VueAtTextarea', | ||
fileName: 'vue-at-textarea', | ||
formats: ['cjs', 'es', 'umd'] | ||
} | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { defineConfig } from 'vite' | ||
|
||
// https://vueschool.io/articles/vuejs-tutorials/how-to-migrate-from-vue-cli-to-vite/ | ||
// vue2 | ||
// import { createVuePlugin as vue } from 'vite-plugin-vue2' | ||
// vue3 | ||
import vue from '@vitejs/plugin-vue' | ||
|
||
// https://vitejs.dev/config/ | ||
export default defineConfig({ | ||
plugins: [vue()] | ||
}) |
This file was deleted.
Oops, something went wrong.