Skip to content

Commit

Permalink
Merge 14ea28c into 8b5eed3
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jan 24, 2024
2 parents 8b5eed3 + 14ea28c commit 2d26dfd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/bundler-webpack/src/build/createClientConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ export const createClientConfig = async (
isBuild: true,
})

// ensure browser packages are packed
config.resolve.set('conditionNames', ['browser', 'import', 'module'])

// use internal vuepress-loader to handle SSR dependencies
config.module
.rule('vue')
Expand Down
3 changes: 3 additions & 0 deletions packages/bundler-webpack/src/build/createServerConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export const createServerConfig = async (
// devtool
config.devtool('source-map')

// ensure node packages are used when SSR
config.resolve.set('conditionNames', ['node', 'import', 'module'])

// do not need to minimize server bundle
config.optimization.minimize(false)

Expand Down
3 changes: 3 additions & 0 deletions packages/bundler-webpack/src/dev/createDevConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ export const createDevConfig = async (
isBuild: false,
})

// ensure browser packages are packed
config.resolve.set('conditionNames', ['browser', 'import', 'module'])

config.plugin('html').use(HtmlPlugin, [
{
template: app.options.templateDev,
Expand Down

0 comments on commit 2d26dfd

Please sign in to comment.