konva/rollup.config.js

40 lines
1.1 KiB
JavaScript
Raw Normal View History

2021-04-30 22:24:27 +08:00
// import resolve from 'rollup-plugin-node-resolve';
// import commonjs from 'rollup-plugin-commonjs';
2019-01-02 04:59:27 +08:00
import typescript from 'rollup-plugin-typescript2';
const pkg = require('./package.json');
export default {
2021-04-30 22:24:27 +08:00
input: `src/index.ts`,
2019-01-02 04:59:27 +08:00
output: [
{
2019-02-27 22:39:56 +08:00
file: 'konva.js',
2019-01-02 04:59:27 +08:00
name: 'Konva',
format: 'umd',
2019-01-06 16:01:20 +08:00
sourcemap: false,
2021-04-30 22:24:27 +08:00
freeze: false,
},
2019-01-02 04:59:27 +08:00
// { file: pkg.module, format: 'es', sourcemap: true }
],
// Indicate here external modules you don't wanna include in your bundle (i.e.: 'lodash')
external: [],
watch: {
2021-04-30 22:24:27 +08:00
include: 'src/**',
2019-01-02 04:59:27 +08:00
},
plugins: [
// Allow json resolution
// json(),
// Compile TypeScript files
typescript({ useTsconfigDeclarationDir: true, abortOnError: false }),
2021-04-30 22:24:27 +08:00
// // Allow bundling cjs modules (unlike webpack, rollup doesn't understand cjs)
// commonjs(),
// // Allow node_modules resolution, so you can use 'external' to control
// // which external modules to include in the bundle
// // https://github.com/rollup/rollup-plugin-node-resolve#usage
// resolve(),
2019-01-02 04:59:27 +08:00
// Resolve source maps to the original source
2019-01-06 16:01:20 +08:00
// sourceMaps()
2021-04-30 22:24:27 +08:00
],
2019-01-02 04:59:27 +08:00
};