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

Commit

Permalink
Merge pull request #19 from Synthetixio/webpack-config
Browse files Browse the repository at this point in the history
fix(webpack): fixed the webpack config
  • Loading branch information
fritzschoff authored Mar 28, 2022
2 parents 2d00182 + 2abc93d commit e0e2a99
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 33 deletions.
40 changes: 20 additions & 20 deletions src/stories/Carousel.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Template.args = {
<div
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
key={1}
>
Expand All @@ -28,10 +28,10 @@ Template.args = {
key={2}
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
>
2
Expand All @@ -40,10 +40,10 @@ Template.args = {
key={3}
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
>
3
Expand All @@ -52,10 +52,10 @@ Template.args = {
key={4}
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
>
4
Expand All @@ -64,10 +64,10 @@ Template.args = {
key={5}
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
>
5
Expand All @@ -77,10 +77,10 @@ Template.args = {
key={6}
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
>
6
Expand All @@ -90,10 +90,10 @@ Template.args = {
key={7}
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
>
7
Expand All @@ -102,10 +102,10 @@ Template.args = {
key={9}
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
>
8
Expand All @@ -114,10 +114,10 @@ Template.args = {
key={10}
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
>
9
Expand All @@ -126,10 +126,10 @@ Template.args = {
key={10}
style={{
minHeight: '100px',
minWidth: '394px',
minWidth: '500px',
color: 'white',
textAlign: 'center',
border: '1px red solid',
border: '1px solid red',
}}
>
10
Expand Down
10 changes: 10 additions & 0 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,17 @@ import fonts from './fonts';
import { device } from './breakpoints';
import { rem } from '../constants';
import spacings from './spacings';

// Just for Webpack
import './main.css';
import './fonts/Inter-Bold.woff';
import './fonts/Inter-Bold.woff2';
import './fonts/Inter-Regular.woff';
import './fonts/Inter-Regular.woff2';
import './fonts/Lustra Text Regular.woff';
import './fonts/Lustra Text Regular.woff2';
import './fonts/GT-America-Regular.woff';
import './fonts/GT-America-Regular.woff2';

const theme = {
rem: rem.toString().concat('px'),
Expand Down
8 changes: 3 additions & 5 deletions src/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ input::-webkit-inner-spin-button {
background-color: rgba(255, 255, 255, 0.2);
}

.lighter-20 {
.lighter-40 {
background-color: rgba(255, 255, 255, 0.4);
}

.lighter-20 {
.lighter-60 {
background-color: rgba(255, 255, 255, 0.6);
}

.lighter-20 {
.lighter-80 {
background-color: rgba(255, 255, 255, 0.8);
}

Expand All @@ -78,8 +78,6 @@ input::-webkit-inner-spin-button {
url('./fonts/Inter-Bold.woff') format('woff');
}

/* GT America */

@font-face {
font-family: 'GT America';
font-style: normal;
Expand Down
3 changes: 2 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
"strictNullChecks": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"strict": true
"strict": true,
"sourceMap": true
},
"include": ["src"],
"exclude": ["node_modules", "dist", "node_modules", "src/**/*.test.tsx", "src/**/*.stories.tsx"]
Expand Down
19 changes: 12 additions & 7 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ module.exports = {
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
sideEffects: true,
},
{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [
Expand All @@ -27,13 +22,23 @@ module.exports = {
},
],
},
{
test: /\.css/i,
use: {
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'styles/',
},
},
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js', 'css'],
extensions: ['.tsx', '.ts', '.js', '.css', '.woff', '.woff2'],
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
},
};

0 comments on commit e0e2a99

Please sign in to comment.