7 Star 30 Fork 6

Gitee 极速下载/editor-js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/codex-team/editor.js
克隆/下载
vite.config.js 1.81 KB
一键复制 编辑 原始数据 按行查看 历史
import path from 'path';
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
import license from 'rollup-plugin-license';
import * as pkg from './package.json';
const NODE_ENV = process.argv.mode || 'development';
const VERSION = pkg.version;
/**
* Trick to use Vite server.open option on macOS
* @see https://github.com/facebook/create-react-app/pull/1690#issuecomment-283518768
*/
process.env.BROWSER = 'open';
export default {
build: {
copyPublicDir: false,
lib: {
entry: path.resolve(__dirname, 'src', 'codex.ts'),
name: 'EditorJS',
fileName: 'editorjs',
},
rollupOptions: {
plugins: [
license({
thirdParty: {
allow: {
test: (dependency) => {
// Manually allow html-janitor (https://github.com/guardian/html-janitor/blob/master/LICENSE)
// because of missing LICENSE file in published package
if (dependency.name === 'html-janitor') {
return true;
}
// Return false for unlicensed dependencies.
if (!dependency.license) {
return false;
}
// Allow MIT and Apache-2.0 licenses.
return ['MIT', 'Apache-2.0'].includes(dependency.license);
},
failOnUnlicensed: true,
failOnViolation: true,
},
output: path.resolve(__dirname, 'dist', 'vendor.LICENSE.txt'),
},
}),
],
},
},
define: {
'NODE_ENV': JSON.stringify(NODE_ENV),
'VERSION': JSON.stringify(VERSION),
},
resolve: {
alias: {
'@/types': path.resolve(__dirname, './types'),
},
},
server: {
port: 3303,
open: true,
},
plugins: [
cssInjectedByJsPlugin(),
],
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/editor-js.git
git@gitee.com:mirrors/editor-js.git
mirrors
editor-js
editor-js
next

搜索帮助