Skip to content

Commit

Permalink
chore: release v0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
2nthony committed Oct 1, 2021
1 parent e131afd commit e26b446
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "macmineable",
"version": "0.11.3",
"version": "0.12.0",
"scripts": {
"dev": "vite",
"build": "vite build",
Expand Down
43 changes: 31 additions & 12 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,37 @@
import { defineConfig } from 'vite'
import { defineConfig, UserConfig } from 'vite'
import { svelte } from '@sveltejs/vite-plugin-svelte'
import path from 'path'
import sveltePreprocess from 'svelte-preprocess'

// https://vitejs.dev/config/
export default defineConfig({
root: 'client',
build: {
outDir: path.join(__dirname, 'dist'),
emptyOutDir: true,
},
plugins: [
svelte({
preprocess: sveltePreprocess(),
}),
],
export default defineConfig(({ command }) => {
const config: UserConfig = {
root: 'client',
build: {
outDir: path.join(__dirname, 'dist'),
emptyOutDir: true,
},
resolve: {
alias: {}
},
plugins: [
svelte({
preprocess: sveltePreprocess(),
}),
],
}

if (command !== 'build') {
config.resolve.alias = [
{
find: /^@svelte-use\/(.*)/,
replacement: path.resolve(
__dirname,
'../../../dev/svelte-use/packages/$1/dist/index.mjs',
),
},
]
}

return config
})

0 comments on commit e26b446

Please sign in to comment.