File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ import type FastGlob from 'fast-glob';
55
66const pluginName = 'rollup-plugin-multi-input' ;
77
8+ const doYouNeedRollupMessage = `
9+ \u001b[31mATTENTION:\u001b[0m Do you still need \u001b[34m${ pluginName } \u001b[0m?
10+ Since Rollup 3, the \u001b[32m[preserveModules](https://rollupjs.org/configuration-options/#output-preservemodules)\u001b[0m
11+ and \u001b[32m[preserveModulesRoot](https://rollupjs.org/configuration-options/#output-preservemodulesroot)\u001b[0m options are available,
12+ which can often eliminate the necessity of \u001b[34m${ pluginName } \u001b[0m.
13+ ` ;
814const isString = ( value : any ) : value is string => typeof value === 'string' ;
915
1016/**
@@ -38,6 +44,11 @@ const multiInput = (options: MultiInputOptions = defaultOptions): Plugin => {
3844 } = options ;
3945 return ( {
4046 name : pluginName ,
47+ buildStart ( ) {
48+ if ( this . info ) {
49+ this . info ( doYouNeedRollupMessage ) ;
50+ }
51+ } ,
4152 options ( conf ) {
4253 // flat to enable input to be a string or an array
4354 const inputs = [ conf . input ] . flat ( ) ;
You can’t perform that action at this time.
0 commit comments