Open mgburns opened 1 year ago
I'm trying to use the postcss-url plugin to copy fonts that are imported by my CSS into the build directory. In order for it to work properly it requires the to option for rollup-plugin-postcss to be set.
postcss-url
to
rollup-plugin-postcss
I was able to get it working locally by setting to: absMain.replace(EXTENSION, '.css') here: https://github.com/developit/microbundle/blob/22187fba8a2d404a9f3dc5db357e243cd45e8479/src/index.js#L495-L498
to: absMain.replace(EXTENSION, '.css')
This is the postcss.config.js I'm trying to use:
postcss.config.js
module.exports = { plugins: { 'postcss-url': { url: 'copy', basePath: '.', assetsPath: '', useHash: false, }, }, };
Happy to provide more details, and thanks for your efforts on this great project!
I'm trying to use the
postcss-url
plugin to copy fonts that are imported by my CSS into the build directory. In order for it to work properly it requires theto
option forrollup-plugin-postcss
to be set.I was able to get it working locally by setting
to: absMain.replace(EXTENSION, '.css')
here: https://github.com/developit/microbundle/blob/22187fba8a2d404a9f3dc5db357e243cd45e8479/src/index.js#L495-L498This is the
postcss.config.js
I'm trying to use:Happy to provide more details, and thanks for your efforts on this great project!