Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: playground/vue-ssr external config merge #220

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 26 additions & 24 deletions playground/ssr-vue/vite.config.noexternal.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
import config from './vite.config.js'
/**
* @type {import('vite').UserConfig}
*/
export default Object.assign(config, {
ssr: {
noExternal: /./,
},
resolve: {
// necessary because vue.ssrUtils is only exported on cjs modules
alias: [
{
find: '@vue/runtime-dom',
replacement: '@vue/runtime-dom/dist/runtime-dom.cjs.js',
},
{
find: '@vue/runtime-core',
replacement: '@vue/runtime-core/dist/runtime-core.cjs.js',
},
],
},
optimizeDeps: {
exclude: ['@vitejs/test-example-external-component'],
},
import { defineConfig } from 'vite'
import createConfig from './vite.config.js'

export default defineConfig((env) => {
const config = createConfig(env)
return Object.assign(config, {
ssr: {
noExternal: /./,
},
resolve: {
// necessary because vue.ssrUtils is only exported on cjs modules
alias: [
{
find: '@vue/runtime-dom',
replacement: '@vue/runtime-dom/dist/runtime-dom.cjs.js',
},
{
find: '@vue/runtime-core',
replacement: '@vue/runtime-core/dist/runtime-core.cjs.js',
},
],
},
optimizeDeps: {
exclude: ['@vitejs/test-example-external-component'],
},
})
})