-
Notifications
You must be signed in to change notification settings - Fork 5
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
Get Style in package.json #6
Comments
I wanted to use this project and found out that asset does not appear in the
Since rollup had changes and asset got both a fileName and name property according to their documentation (I have tested locally and I confirm): https://rollupjs.org/guide/en/#generatebundle. It means your rollup version is outdated. outputManifest({
filter: () => true
}) |
I'm also looking into adding CSS files in the manifest 👀 |
I have updated this plugin with the support to collect assets to manifest. As @dmail mentioned, AssetInfo.name is optional. if the plugin processes such asset but don't provide the You can add the Here is an example to output css assets which is pre processed by the rollup-plugin-postcss to the manifest import outputManifest, {isAsset} from 'rollup-plugin-output-manifest'
import postcss from 'rollup-plugin-postcss'
export default {
input: {
pageA: './page-a.js',
pageB: './page-b.js',
pageC: './page-c.js',
},
plugins: [
postcss({extract: true}),
outputManifest({
fileName: "manifest.json",
map: bundle => {
if (isAsset(bundle) && !bundle.name) {
// gen name from fileName
// base on output.assetFileNames
const baseName = bundle.fileName.split('-')[0];
bundle.name = baseName;
}
return bundle;
}
})
],
output: {
entryFileNames: '[name]-[hash].js',
assetFileNames: '[name]-[hash].[extname]',
dir: './dist/',
format: 'esm',
},
}; |
Hello,
How can i have the
style.css
?I got only a js file.
Thanks for the plugin !!
The text was updated successfully, but these errors were encountered: