Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports: 'named',
sourcemap: true,
},
],
plugins: [
external({
includeDependencies: true,
}),
// https://github.com/egoist/rollup-plugin-postcss/issues/110
// https://github.com/cisen/blog/issues/295
postcss({
extensions: ['.css', '.less'],
use: [['less', lessLoaderConfig]],
}),
url(),
svgr(),
yaml(),
resolve(),
typescript({
rollupCommonJSResolveHack: true,
clean: true,
transformers: [
() => ({
before: transformer,
}),
],
}),
commonjs(),
],
}
}
function getPlugins(opts = {} as { minCSS: boolean; }) {
const { minCSS } = opts;
return [
url(),
svgr(),
postcss({
extract: extractCSS,
inject: injectCSS,
modules,
minimize: !!minCSS,
use: [
[
'less',
{
plugins: [new NpmImport({ prefix: '~' })],
javascriptEnabled: true,
...lessInRollupMode,
},
],
[
'sass',
const svgr = require('@svgr/rollup').default
const svgSprite = require('rollup-plugin-svg-sprite')
const config = require('../../rollup.config')
config.plugins.push(svgr())
config.plugins.push(
svgSprite({
outputFolder: 'dist/public'
})
)
module.exports = config