You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

22 lines
666 B

const merge = require('deepmerge');
module.exports = ({ config }, options) => {
const { limit } = merge({ limit: '10000' }, options);
const urlLoader = require.resolve('url-loader');
const fileLoader = require.resolve('file-loader');
config.module
.rule('woff')
.test(/\.(woff|woff2)(\?v=\d+\.\d+\.\d+)?$/)
.loader('url', urlLoader, { limit, mimetype: 'application/font-woff' });
config.module
.rule('ttf')
.test(/\.ttf(\?v=\d+\.\d+\.\d+)?$/)
.loader('url', urlLoader, { limit, mimetype: 'application/octet-stream' });
config.module
.rule('eot')
.test(/\.eot(\?v=\d+\.\d+\.\d+)?$/)
.loader('file', fileLoader);
};