Skip to content

Commit

Permalink
fix: fix env replacement for vite internal modules
Browse files Browse the repository at this point in the history
fix #451
  • Loading branch information
yyx990803 committed Jun 24, 2020
1 parent 07af6f4 commit cebe2e9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node/build/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ export async function build(options: BuildConfig): Promise<BuildResult> {
// - which makes it impossible to exclude Vue templates from it since
// Vue templates are compiled into js and included in chunks.
createReplacePlugin(
(id) => /\.(j|t)sx?$/.test(id),
(id) => /\.(j|t)sx?$/.test(id) || id.startsWith(`/vite/`),
{
...userEnvReplacements,
'import.meta.env.BASE_URL': JSON.stringify(publicBasePath),
Expand Down

0 comments on commit cebe2e9

Please sign in to comment.