Skip to content

Commit

Permalink
fix: package BUG on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
caoxiemeihao committed Nov 8, 2020
1 parent 03528a8 commit fb362b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* 参考链接: https://github.com/vitejs/vite/blob/master/src/node/config.ts
*/
import { join } from 'path'
import { join, sep } from 'path'
import { UserConfig } from 'vite'
import dotenv from 'dotenv'

Expand Down Expand Up @@ -45,7 +45,7 @@ const config: UserConfig = {
{
name: '@rollup/plugin-cjs2esm',
transform(code, filename) {
if (filename.includes('/node_modules/')) {
if (filename.includes(`${sep}node_modules${sep}`)) {
return code
}

Expand Down

0 comments on commit fb362b2

Please sign in to comment.