Files
yjs/rollup.config.js

45 lines
821 B
JavaScript
Raw Normal View History

const resolver = {
2019-03-01 23:26:40 +01:00
resolveId (importee) {
return
2019-03-01 23:26:40 +01:00
if (importee === 'yjs') {
return `${process.cwd()}/src/index.js`
}
}
}
2018-11-25 03:17:00 +01:00
export default [{
// cjs output
input: {
yjs: './src/index.js',
testHelper: './tests/testHelper.js',
internals: './src/internals.js'
},
2020-01-13 07:41:31 +01:00
output: {
dir: 'dist',
2018-11-25 22:39:30 +01:00
format: 'cjs',
entryFileNames : '[name].cjs',
sourcemap: true
2020-01-13 07:41:31 +01:00
},
plugins: [
resolver
],
external: id => /^(lib0|y-protocols)\//.test(id)
}, {
// esm output
input: {
yjs: './src/index.js',
testHelper: './tests/testHelper.js',
internals: './src/internals.js'
},
2021-11-06 15:55:59 +01:00
output: {
dir: 'dist',
2021-11-06 15:55:59 +01:00
format: 'esm',
entryFileNames : '[name].mjs',
2020-01-13 07:41:31 +01:00
sourcemap: true
},
plugins: [
resolver
2020-01-13 07:41:31 +01:00
],
external: id => /^(lib0|y-protocols)\//.test(id)
2019-04-23 20:51:32 +02:00
}]