mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
ebf0c47c25
* Upgrade standard.js # Conflicts: # yarn.lock * Upgrade babel-eslint
37 lines
845 B
JavaScript
37 lines
845 B
JavaScript
const path = require('path')
|
|
const glob = require('glob')
|
|
|
|
module.exports = {
|
|
webpack: (config, { dev }) => {
|
|
config.module.rules.push(
|
|
{
|
|
test: /\.(css|scss)/,
|
|
loader: 'emit-file-loader',
|
|
options: {
|
|
name: 'dist/[path][name].[ext]'
|
|
}
|
|
}
|
|
,
|
|
{
|
|
test: /\.css$/,
|
|
use: ['babel-loader', 'raw-loader', 'postcss-loader']
|
|
}
|
|
,
|
|
{
|
|
test: /\.s(a|c)ss$/,
|
|
use: ['babel-loader', 'raw-loader', 'postcss-loader',
|
|
{ loader: 'sass-loader',
|
|
options: {
|
|
includePaths: ['styles', 'node_modules']
|
|
.map((d) => path.join(__dirname, d))
|
|
.map((g) => glob.sync(g))
|
|
.reduce((a, c) => a.concat(c), [])
|
|
}
|
|
}
|
|
]
|
|
}
|
|
)
|
|
return config
|
|
}
|
|
}
|