2019/08/27
Short LT
/**
* 仮想DOMを完全に理解した
*/
const app = document.getElementById('app');
const p = document.createElement('p');
p.innerText = '仮想DOMを完全に理解した';
app.appendChild(p);
module.exports = {
configureWebpack: {
config.output.filename('[name].js')
config.output.chunkFilename('js/[name].js')
config.module
.rule('frontend/src/static/')
.test(/\.(png|jpe?g|gif|webp)(\?.*)?$/)
.use('url-loader')
.loader('url-loader')
.options({
limit: 4096,
name: 'static/[name].[ext]'
})
config.plugin('extract-css').use(MiniCssExtractPlugin, [
{
filename: '[name].css',
chunkFilename: ''
}
])
config.splitChunks = {
cacheGroups: {
node_vendors: {
test: /[\\/]node_modules[\\/]/,
chunks: 'all',
priority: 1
}
}
}
}
}