1
1
mirror of https://github.com/primer/css.git synced 2024-11-23 11:27:26 +03:00

chore: nix resolve alias for primer/index.scss

This commit is contained in:
Shawn Allen 2019-02-04 13:23:49 -08:00
parent 795544d345
commit 6a6adf0f25

View File

@ -1,6 +1,5 @@
/* eslint-disable no-console */
const sync = require('./sync')
const cssLoaderConfig = require('@zeit/next-css/css-loader-config')
const {CI, NODE_ENV, NOW_URL} = process.env
module.exports = (nextConfig = {}) => {
@ -31,22 +30,6 @@ module.exports = (nextConfig = {}) => {
sync({watch: !CI})
}
// in production, we don't need to compile Primer from SCSS; just inline
// the CSS build!
if (!dev) {
config.resolve.alias['primer/index.scss$'] = require.resolve('primer/build/build.css')
const cssLoader = cssLoaderConfig(config, {
dev,
isServer
})
options.defaultLoaders.css = cssLoader
config.module.rules.push({
test: /\.css$/,
loader: cssLoader
})
}
config.module.rules.push({
test: /\.svg$/,
use: '@svgr/webpack'