Skip to content
This repository has been archived by the owner on Jul 6, 2021. It is now read-only.

Commit

Permalink
fix css cache-control max-age 0 bug (#335)
Browse files Browse the repository at this point in the history
Part of the fix for vercel/next.js#5464
The other part is a next.js change I am checking in now.

Fixes vercel/next.js#5464 
Fixes #243
  • Loading branch information
Enalmada authored and timneutkens committed Nov 14, 2018
1 parent be21851 commit 3556cc4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/next-css/css-loader-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ module.exports = (
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: dev
? 'static/css/[name].css'
: 'static/css/[name].[contenthash:8].css',
? 'static/chunks/[name].css'
: 'static/chunks/[name].[contenthash:8].css',
chunkFilename: dev
? 'static/css/[name].chunk.css'
: 'static/css/[name].[contenthash:8].chunk.css',
? 'static/chunks/[name].chunk.css'
: 'static/chunks/[name].[contenthash:8].chunk.css',
orderWarning: false,
reloadAll: true
})
Expand All @@ -52,7 +52,8 @@ module.exports = (
if (!Array.isArray(config.optimization.minimizer)) {
config.optimization.minimizer = []
}
config.optimization.minimizer.push(new require('optimize-css-assets-webpack-plugin')({}))
const OptimizeCssAssetsWebpackPlugin = require('optimize-css-assets-webpack-plugin');
config.optimization.minimizer.push(new OptimizeCssAssetsWebpackPlugin({}))
}

const postcssConfig = findUp.sync('postcss.config.js', {
Expand Down

0 comments on commit 3556cc4

Please sign in to comment.