add pm2
This commit is contained in:
@@ -5,10 +5,13 @@ import resolve from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import json from '@rollup/plugin-json';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
|
||||
import esbuild from 'rollup-plugin-esbuild';
|
||||
import alias from '@rollup/plugin-alias';
|
||||
import replace from '@rollup/plugin-replace';
|
||||
|
||||
const pkgs = JSON.parse(fs.readFileSync('./package.json', 'utf-8'));
|
||||
/**
|
||||
* @type {import('rollup').RollupOptions}
|
||||
*/
|
||||
@@ -23,7 +26,7 @@ const config = {
|
||||
plugins: [
|
||||
replace({
|
||||
preventAssignment: true, // 防止意外赋值
|
||||
VERSION: JSON.stringify('1.0.0'),
|
||||
VERSION: JSON.stringify(pkgs.version || '1.0.0'),
|
||||
}),
|
||||
alias({
|
||||
// only esbuild needs to be configured
|
||||
|
||||
Reference in New Issue
Block a user