Skip to content
This repository has been archived by the owner on Aug 27, 2020. It is now read-only.

Commit

Permalink
fix next.config.js
Browse files Browse the repository at this point in the history
  • Loading branch information
이봉균 committed Oct 8, 2017
1 parent 96ff015 commit ce7ad60
Showing 1 changed file with 26 additions and 32 deletions.
58 changes: 26 additions & 32 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
const path = require('path')
const trash = require('trash')
const {exportPathMap} = require('nextjs-export-path-map')
const trash = require('trash')

module.exports = {
webpack(config) {
if (process.env.ANALYZE) {
config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: 'server',
analyzerPort: 8888,
openAnalyzer: true
}))
webpack(config) {
if (process.env.ANALYZE) {
config.plugins.push(new BundleAnalyzerPlugin({
analyzerMode: 'server', analyzerPort: 8888, openAnalyzer: true
}))
}
config.module.rules.push({
test: /\.p?css$/, use: [
{
loader: 'emit-file-loader', options: {
name: 'dist/[path][name].[ext]'
}
config.module.rules.push({
test: /\.p?css$/,
use: [
{
loader: 'emit-file-loader',
options: {
name: 'dist/[path][name].[ext]'
}
},
{
loader: 'skeleton-loader',
options: {
procedure : function (stylesheet) {
trash(this._module.userRequest + '.json')
return 'exports.default = \'' + stylesheet + '\';'
}, cacheable: false
}
},
'postcss-loader'
]
})
return config
},
exportPathMap: exportPathMap.bind(null, path.join(__dirname, 'pages'))
}, {
loader: 'skeleton-loader', options: {
procedure : function (stylesheet) {
trash(this._module.userRequest + '.json')
return 'exports.default = \'' + stylesheet + '\';'
}, cacheable: false
}
}, 'postcss-loader'
]
})
return config
},
exportPathMap: exportPathMap.bind(null, path.join(__dirname, 'pages'))
}

0 comments on commit ce7ad60

Please sign in to comment.