-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: adjust iframe placeholder font size
Related to #994
- Loading branch information
Showing
2 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
var alias = require('@rollup/plugin-alias'); | ||
var babel = require('@rollup/plugin-babel'); | ||
var copy = require('rollup-plugin-copy'); | ||
var reactSvg = require('@svgr/rollup'); | ||
var resolve = require('@rollup/plugin-node-resolve'); | ||
var pkg = require('./package.json'); | ||
|
||
function pgl(plugins = []) { | ||
|
||
return [ | ||
alias({ | ||
entries: [ | ||
{ find: 'react', replacement: 'preact/compat' }, | ||
{ find: 'react-dom', replacement: 'preact/compat' } | ||
] | ||
}), | ||
resolve({ | ||
resolveOnly: [ 'diagram-js' ] | ||
}), | ||
reactSvg(), | ||
babel({ | ||
babelHelpers: 'bundled', | ||
plugins: [ | ||
[ '@babel/plugin-transform-react-jsx', { | ||
'importSource': 'preact', | ||
'runtime': 'automatic' | ||
} ] | ||
] | ||
}), | ||
...plugins | ||
]; | ||
|
||
} | ||
|
||
|
||
var rollup_config = [ | ||
{ | ||
input: 'src/index.js', | ||
output: [ | ||
{ | ||
sourcemap: true, | ||
format: 'commonjs', | ||
file: pkg.main | ||
}, | ||
{ | ||
sourcemap: true, | ||
format: 'esm', | ||
file: pkg.module | ||
} | ||
], | ||
external: [ | ||
'min-dash', | ||
'big.js', | ||
'preact', | ||
'preact/jsx-runtime', | ||
'preact/hooks', | ||
'preact/compat', | ||
'preact-markup', | ||
'flatpickr', | ||
'showdown', | ||
'@carbon/grid', | ||
'feelers' | ||
], | ||
plugins: pgl([ | ||
copy({ | ||
targets: [ | ||
{ src: 'assets/form-js-base.css', dest: 'dist/assets' }, | ||
{ src: '../../node_modules/flatpickr/dist/themes/light.css', dest: 'dist/assets/flatpickr' } | ||
] | ||
}) | ||
]), | ||
|
||
onwarn(warning, warn) { | ||
|
||
// TODO(@barmac): remove once https://github.com/moment/luxon/issues/193 is resolved | ||
if (warning.code === 'CIRCULAR_DEPENDENCY') { | ||
if (warning.message.includes('luxon')) { | ||
return; | ||
} | ||
} | ||
|
||
if (warning.code === 'THIS_IS_UNDEFINED') { | ||
if (warning.id.includes('flatpickr')) { | ||
return; | ||
} | ||
} | ||
|
||
warn(warning); | ||
} | ||
} | ||
]; | ||
|
||
exports.default = rollup_config; |