Skip to content

Commit

Permalink
Upgrade with-carbon-components to built-in SCSS (vercel#10321)
Browse files Browse the repository at this point in the history
Co-authored-by: Joe Haddad <timer150@gmail.com>
  • Loading branch information
2 people authored and chibicode committed Feb 11, 2020
1 parent 89cddef commit ca5723f
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 47 deletions.
28 changes: 5 additions & 23 deletions examples/with-carbon-components/next.config.js
@@ -1,23 +1,5 @@
const withSass = require('@zeit/next-sass')
const withImages = require('next-images')

module.exports = withImages(
withSass({
webpack(config) {
config.module.rules.push({
test: /\.(png|svg|eot|otf|ttf|woff|woff2)$/,
use: {
loader: 'url-loader',
options: {
limit: 100000,
publicPath: './',
outputPath: 'static/',
name: '[name].[ext]',
},
},
})

return config
},
})
)
module.exports = {
experimental: {
scss: true,
},
}
2 changes: 0 additions & 2 deletions examples/with-carbon-components/package.json
Expand Up @@ -10,12 +10,10 @@
},
"license": "ISC",
"dependencies": {
"@zeit/next-sass": "^1.0.1",
"carbon-components": "^9.6.4",
"carbon-components-react": "^6.19.1",
"carbon-icons": "^7.0.7",
"next": "latest",
"next-images": "^0.10.6",
"react": "^16.7.0",
"react-dom": "^16.7.0"
}
Expand Down
7 changes: 7 additions & 0 deletions examples/with-carbon-components/pages/_app.js
@@ -0,0 +1,7 @@
import '../styles/custom-theme.scss'

function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
}

export default MyApp
17 changes: 0 additions & 17 deletions examples/with-carbon-components/pages/_document.js

This file was deleted.

2 changes: 0 additions & 2 deletions examples/with-carbon-components/pages/index.js
@@ -1,8 +1,6 @@
import React, { Component, Fragment } from 'react'
import { Button } from 'carbon-components-react'

import '../static/myCustomTheme.scss'

export default class DemoApp extends Component {
render() {
return (
Expand Down
3 changes: 0 additions & 3 deletions examples/with-carbon-components/static/myCustomTheme.scss

This file was deleted.

2 changes: 2 additions & 0 deletions examples/with-carbon-components/styles/custom-theme.scss
@@ -0,0 +1,2 @@
@import './export.scss';
@import '~carbon-components/scss/globals/scss/styles.scss';

0 comments on commit ca5723f

Please sign in to comment.