updated 构建工具调整
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import resolve from '@rollup/plugin-node-resolve'; // 使用node_modules包
|
||||
import terser from '@rollup/plugin-terser'; // 代码压缩
|
||||
import babel from '@rollup/plugin-babel'; // ECMAScript兼容
|
||||
import {importAssertionsPlugin} from 'rollup-plugin-import-assert';
|
||||
import {importAssertions} from 'acorn-import-assertions';
|
||||
import pkg from './package.json' assert { type:'json' }; // 获取package信息
|
||||
import pkg from './package.json' assert { type:'json' }; // 获取package信息
|
||||
|
||||
// 版权信息
|
||||
const repository = pkg.repository.url.replace(/(.+)(:\/\/.+)\.git$/,'https$2');
|
||||
@@ -24,7 +22,6 @@ const banner = `/*!
|
||||
|
||||
const commonPlugins = [
|
||||
resolve(),
|
||||
importAssertionsPlugin(),
|
||||
terser(),
|
||||
babel({
|
||||
babelHelpers: 'runtime',
|
||||
@@ -44,7 +41,6 @@ const commonPlugins = [
|
||||
format: 'es',
|
||||
banner
|
||||
}],
|
||||
acornInjectPlugins: [ importAssertions ],
|
||||
plugins: commonPlugins,
|
||||
watch: {
|
||||
exclude: 'node_modules/**'
|
||||
@@ -59,7 +55,6 @@ const commonPlugins = [
|
||||
file: './dist/relationship-mode.min.mjs',
|
||||
format: 'es'
|
||||
}],
|
||||
acornInjectPlugins: [ importAssertions ],
|
||||
plugins: commonPlugins,
|
||||
watch: {
|
||||
exclude: 'node_modules/**'
|
||||
|
||||
Reference in New Issue
Block a user