You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

vite-plugin-esmodule

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-esmodule - npm Package Compare versions

Comparing version

to
1.2.2

2

package.json
{
"name": "vite-plugin-esmodule",
"version": "1.2.1",
"version": "1.2.2",
"description": "Build ES module to CommonJs module for Node.js",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -36,9 +36,8 @@ # vite-plugin-esmodule

// this means that you have explicit specified the entry file
// the purpose of this design is to smooth out the difference between Vite and Webpack
// 🌱 the purpose of this design is to smooth out the difference between Vite and Webpack
{ 'file-type': 'file-type/index.js' },
// when setting `target: 'node'` in Webpack, it always takes `exports.node` as the entry
// in other words, using 'filt-type' string can also work normally
// but Vite always gives priority to `exports.browser` as the entry
{ 'file-type': 'file-type/index.js' },
// it can work normally when using Webpack
// 🙉 it can work normally when using Webpack
// 'filt-type',

@@ -45,0 +44,0 @@ ]),

@@ -36,9 +36,8 @@ # vite-plugin-esmodule

// 这里表示你可以显示的指定你要以哪个文件作为入口
// 这样设计的目的是为了抹平 Vite 和 Webpack 之间的差异
// 🌱 这样设计的目的是为了抹平 Vite 和 Webpack 之间的差异
{ 'file-type': 'file-type/index.js' },
// 当使用 Webpack 并设置了 target: 'node' 的时候,Webpack 会自动以 exports.node 为入口
// 也就是说这里使用 'filt-type' 字符串也是可行的
// 但是 Vite 总是优先使用 exports.browser 字段作为入口
{ 'file-type': 'file-type/index.js' },
// 在 Webpack 下这样写也可行
// 🙉 在 Webpack 下这样写也可行
// 'filt-type',

@@ -45,0 +44,0 @@ ]),