Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Fontgen runs two times when used with ExtractText #25

Open
sergeymorkovkin opened this issue Jun 2, 2016 · 1 comment
Open

Fontgen runs two times when used with ExtractText #25

sergeymorkovkin opened this issue Jun 2, 2016 · 1 comment

Comments

@sergeymorkovkin
Copy link

Here is code snippet to test. Function output should be merged into webpack config:

`
export const plugins = {
HtmlPlugin: require('html-webpack-plugin'),
ExtractTextPlugin: require('extract-text-webpack-plugin'),
};

// Font generator
//
export const fontgen = () => {

const extractFontCss = new plugins.ExtractTextPlugin('2', 'assets/css/[id].[contenthash].icons.css');

return {
module: {
loaders: [{
test: /icons.json$/,
loader: extractFontCss.extract('vue-style', 'css!fontgen?fileName=assets/fonts/[fontname].[hash][ext]'),
}],
},
plugins: [
extractFontCss
]
};

};
`

@SleepWalker
Copy link
Contributor

Hi,

as temporary solution I can suggest you to change fileName config property to assets/fonts/[fontname][ext]?[hash]

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants