I need some help, I want to use your plugins with Webpack Encore, but the versioning and minifying not process the generated files, any ideas ?
Config :
// webpack.config.js
let Encore = require('@symfony/webpack-encore');
let GoogleFontsPlugin = require("google-fonts-webpack-plugin");
Encore
// directory where all compiled assets will be stored
.setOutputPath('./www/build/')
// what's the public path to this directory (relative to your project's document root dir)
.setPublicPath('/build')
// // empty the outputPath dir before each build
.cleanupOutputBeforeBuild()
.addPlugin(new GoogleFontsPlugin({
fonts: [
{ family: "Roboto", variants: [ "300", "700", "300italic", "700italic" ] },
{ family: "Roboto Slab", variants: ["700" ] },
],
"path": "fonts/",
"filename": "css/google-fonts.css"
}))
// will output as web/build/global.css
.addStyleEntry('css/style', './www/css/styles.css')
.enableSourceMaps(!Encore.isProduction())
// create hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
;
// export the final configuration
module.exports = Encore.getWebpackConfig();
Command :
yarn encore production
I even tried to add .addStyleEntry('css/google-fonts.min', './www/build/css/google-fonts.css') in the configuration but Webpack throw this error :
Entry module not found: Error: Can't resolve './www/build/css/google-fonts.css' in '/home/XXX'
Hello,
I need some help, I want to use your plugins with Webpack Encore, but the versioning and minifying not process the generated files, any ideas ?
Config :
Command :
I even tried to add
.addStyleEntry('css/google-fonts.min', './www/build/css/google-fonts.css')
in the configuration but Webpack throw this error :