mirror of
https://github.com/Aviortheking/next-template.git
synced 2025-04-22 10:42:10 +00:00
43 lines
893 B
JavaScript
43 lines
893 B
JavaScript
const stylus = require('@zeit/next-stylus')
|
|
const purgeCSS = require('next-purgecss')
|
|
const withPlugins = require('next-compose-plugins')
|
|
const {PHASE_DEVELOPMENT_SERVER} = require('next/constants')
|
|
|
|
module.exports = withPlugins([
|
|
[stylus, {
|
|
cssModules: true,
|
|
cssLoaderOptions: {
|
|
localIdentName: "[hash:base64:6]",
|
|
},
|
|
[PHASE_DEVELOPMENT_SERVER]: {
|
|
cssLoaderOptions: {
|
|
localIdentName: "[path][name]__[local]"
|
|
}
|
|
}
|
|
}],
|
|
// [purgeCSS, {
|
|
// purgeCssPaths: [
|
|
// 'pages/**/*',
|
|
// 'components/**/*',
|
|
// 'styl/**/*'
|
|
// ],
|
|
// purgeCSS: {
|
|
// content: [
|
|
// 'components/**/*.tsx',
|
|
// 'pages/**/*.tsx'
|
|
// ]
|
|
// }
|
|
// }],
|
|
], {
|
|
exportTrailingSlash: true,
|
|
plugins: [
|
|
["styled-jsx/babel", {
|
|
optimizeForSpeed: true,
|
|
vendorPrefixes: true,
|
|
sourceMaps: true,
|
|
plugins: ["styled-jsx-plugin-stylus"]
|
|
}]
|
|
]
|
|
}
|
|
)
|