Files
ionic-framework/packages/react/rollup.config.js
Liam DeBeasi c946af29d3 refactor(react): only ship es modules (#26044)
BREAKING CHANGE:

`@ionic/react` and `@ionic/react-router` no longer ship a CommonJS entry point. Instead, only an ES Module entry point is provided for improved compatibility with Vite.
2022-09-30 12:01:48 -04:00

26 lines
550 B
JavaScript

import resolve from '@rollup/plugin-node-resolve';
import sourcemaps from 'rollup-plugin-sourcemaps';
// import json from '@rollup/plugin-json';
export default {
input: {
index: 'dist-transpiled/index',
// 'routing/index': 'dist-transpiled/routing/index'
},
output: [
{
dir: 'dist/',
entryFileNames: '[name].js',
chunkFileNames: '[name]-[hash].js',
format: 'es',
sourcemap: true,
}
],
external: (id) => !/^(\.|\/)/.test(id),
plugins: [
resolve(),
sourcemaps(),
// json()
],
};