We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aea5c57 commit e6907cfCopy full SHA for e6907cf
webpack.config.js
@@ -2,6 +2,7 @@
2
* External dependencies
3
*/
4
const webpack = require( 'webpack' );
5
+const path = require( 'path' );
6
const ExtractTextPlugin = require( 'extract-text-webpack-plugin' );
7
const WebpackRTLPlugin = require( 'webpack-rtl-plugin' );
8
const SpritePlugin = require( 'svg-sprite-loader/plugin' );
@@ -81,8 +82,9 @@ const config = {
81
82
options: {
83
limit: 8000, // Convert images < 8kb to base64 strings
84
name: '[name].[ext]',
- useRelativePath: true,
85
- outputPath: './public/',
+ outputPath: ( url, resourcePath, context ) => {
86
+ return `./public/${ path.relative( context, resourcePath ).replace( 'resources/assets', '' ) }`
87
+ }
88
},
89
90
],
0 commit comments