-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using rollup with webpack in web app #522
Comments
It may make sense to provide a function to the export default {
...
external: [
function ( id ) { return id.endsWith( '.css' ); }
]
}; |
Any news on this feature? 🤔 |
I also have this use case, but for |
A good workaround in the meantime might be to use // rollup.config.js
import { resolve } from 'path';
import { sync as glob } from 'glob';
export default {
...,
external: glob( '**/*.css' ).map( file => resolve( file ) ).concat( 'otherExternal' )
}; That would automatically exclude all .css files. I don't think an equivalent to I do like the idea of allowing |
Thanks. That's basically where I landed last night, but I hadn't made it back here yet to include the suggestion. |
allow options.external to be a function
In 0.26.5 you can supply a function instead of an array for |
Very helpful update. Mind including details in the wiki that covers options for |
done 👍 |
Awesome 👍 Thanks ! |
Its more a question than issue.
I would like to use rollup for its tree shaking and minimal bundle size (compare to alternatives) capabilities for JS files in my project as a pre step before running webpack to bundle it with other assets (css, images, etc.).
Currently, rollup is failing because it doesn't understand css syntax.
Is it possible to achieve only js [,jsx] bundling and ignore all other file types (treat it as external) without specifying each file's path in the externals array (which can be very tedious) ? treat it exactly like node_modules without the node-resolve plugin.
Maybe something like webpack's resolve.extensions.
Thanks
The text was updated successfully, but these errors were encountered: