colouring-montreal/app/razzle.config.js

32 lines
929 B
JavaScript
Raw Permalink Normal View History

2021-04-18 15:38:21 -04:00
const CopyPlugin = require('copy-webpack-plugin');
module.exports = {
plugins: [
{
2021-04-18 15:38:21 -04:00
name: 'typescript',
options: {
forkTsChecker: {
2021-04-18 15:38:21 -04:00
eslint: undefined // { files: './src/**/*.{ts,tsx,js,jsx}' }
},
},
},
],
2021-04-18 15:38:21 -04:00
modifyWebpackConfig({ env: { target, dev }, webpackConfig }) {
// load webfonts
2021-04-18 15:38:21 -04:00
webpackConfig.module.rules = webpackConfig.module.rules || [];
webpackConfig.module.rules.push({
test: /\.(eot|svg|ttf|woff|woff2)$/,
2021-04-18 15:38:21 -04:00
type: 'asset/resource'
});
// add the map_styles directory to the build output
2021-04-18 15:38:21 -04:00
const plugins = webpackConfig.plugins || [];
plugins.push(new CopyPlugin({
patterns: [ {from: 'map_styles', to: 'map_styles'}]
}));
2021-04-18 15:38:21 -04:00
webpackConfig.plugins = plugins;
2021-04-18 15:38:21 -04:00
return webpackConfig;
},
};