fix: package BUG on windows.

This commit is contained in:
草鞋没号 2020-11-08 18:43:37 +08:00
parent 03528a8de4
commit fb362b26a8

View File

@ -1,7 +1,7 @@
/** /**
* 参考链接: https://github.com/vitejs/vite/blob/master/src/node/config.ts * 参考链接: 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 { UserConfig } from 'vite'
import dotenv from 'dotenv' import dotenv from 'dotenv'
@ -45,7 +45,7 @@ const config: UserConfig = {
{ {
name: '@rollup/plugin-cjs2esm', name: '@rollup/plugin-cjs2esm',
transform(code, filename) { transform(code, filename) {
if (filename.includes('/node_modules/')) { if (filename.includes(`${sep}node_modules${sep}`)) {
return code return code
} }