Open DavainWhite opened 4 years ago
Hello. Any updates about this?
Did you find a solution?
Any updates about this?
I tried like this and it worked:
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = function (context, options) {
return {
name: 'docusaurus-custom-webpack',
configureWebpack(config, isServer, utils) {
return {
plugins: [
new CopyWebpackPlugin({
patterns: [
{
from: 'libs/design-system',
to: './assets/design-system',
},
],
}),
],
};
},
};
};
Description
It would be great if we could included assets from a shared asset library by just adding a assets option to the browser builder.
Motivation
Helps reduce duplicate assets and massively reduces monoprepo sizes.
Suggested Implementation
have webpack look at the path and copy and and paste everything there into the dist folder. as for duplicate files just overwrite them I guess.
Alternate Implementations
custom webpack but that would take alot of time to setup and doesn't realy follow the nrwl theme of having a single source for webpack stuff (angular.json file)