mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-12 12:43:48 +08:00
add external option
This commit is contained in:
parent
6d048c3152
commit
430ff27a9e
@ -21,7 +21,7 @@ const resolve = _path => path.resolve(__dirname, '../../', _path)
|
|||||||
function genConfig(opts) {
|
function genConfig(opts) {
|
||||||
const config = {
|
const config = {
|
||||||
input: {
|
input: {
|
||||||
input: resolve('src/index.js'),
|
input: opts.input,
|
||||||
plugins: [
|
plugins: [
|
||||||
flow(),
|
flow(),
|
||||||
node(),
|
node(),
|
||||||
@ -37,7 +37,7 @@ function genConfig(opts) {
|
|||||||
objectAssign: 'Object.assign',
|
objectAssign: 'Object.assign',
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
external: ['vue'],
|
external: opts.external,
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
file: opts.file,
|
file: opts.file,
|
||||||
@ -58,21 +58,36 @@ function genConfig(opts) {
|
|||||||
|
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
|
input: resolve('src/index.js'),
|
||||||
file: resolve('dist/tiptap.js'),
|
file: resolve('dist/tiptap.js'),
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
env: 'development',
|
env: 'development',
|
||||||
|
external: ['vue'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
input: resolve('src/index.js'),
|
||||||
file: resolve('dist/tiptap.min.js'),
|
file: resolve('dist/tiptap.min.js'),
|
||||||
format: 'umd',
|
format: 'umd',
|
||||||
env: 'production',
|
env: 'production',
|
||||||
|
external: ['vue'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
input: resolve('src/index.js'),
|
||||||
file: resolve('dist/tiptap.common.js'),
|
file: resolve('dist/tiptap.common.js'),
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
|
external: ['vue'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
input: resolve('src/index.js'),
|
||||||
file: resolve('dist/tiptap.esm.js'),
|
file: resolve('dist/tiptap.esm.js'),
|
||||||
format: 'es',
|
format: 'es',
|
||||||
|
external: ['vue'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
input: resolve('src/helpers/index.js'),
|
||||||
|
file: resolve('dist/helpers.js'),
|
||||||
|
format: 'umd',
|
||||||
|
env: 'development',
|
||||||
|
external: id => !/^[\.\/]/.test(id),
|
||||||
},
|
},
|
||||||
].map(genConfig)
|
].map(genConfig)
|
||||||
|
Loading…
Reference in New Issue
Block a user