File tree 6 files changed +32
-4
lines changed
6 files changed +32
-4
lines changed Original file line number Diff line number Diff line change
1
+ tsdx.config.js
Original file line number Diff line number Diff line change 81
81
"@types/tinymce" : " ~4.5.23" ,
82
82
"@typescript-eslint/eslint-plugin" : " ~2.15.0" ,
83
83
"@typescript-eslint/parser" : " ~2.15.0" ,
84
+ "autoprefixer" : " ~9.7.3" ,
84
85
"awesome-typescript-loader" : " ~5.2.1" ,
85
86
"babel-loader" : " ~8.0.6" ,
86
87
"bootstrap" : " ~4.4.0" ,
87
88
"commitizen" : " ~4.0.3" ,
88
89
"commitlint-config-cz" : " 0.12.1" ,
89
90
"coveralls" : " ~3.0.6" ,
90
91
"cross-env" : " ~6.0.3" ,
92
+ "cssnano" : " ~4.1.10" ,
91
93
"cz-conventional-changelog" : " ~3.0.2" ,
92
94
"enzyme" : " ~3.11.0" ,
93
95
"enzyme-adapter-react-16" : " ~1.15.2" ,
110
112
"react-docgen" : " ~5.1.0" ,
111
113
"react-docgen-typescript-loader" : " ~3.6.0" ,
112
114
"react-dom" : " ~16.12.0" ,
115
+ "rollup-plugin-postcss" : " ~2.0.3" ,
113
116
"sass-loader" : " ~8.0.0" ,
114
117
"semantic-release" : " ~15.14.0" ,
115
118
"sinon" : " ~8.0.1" ,
Original file line number Diff line number Diff line change 4
4
5
5
/* Import bootstrap */
6
6
7
- @import " node_modules/bootstrap/scss/bootstrap" ;
7
+ @import " node_modules/bootstrap/scss/bootstrap" ;
8
+
9
+ /* Other CSS Imports */
10
+
11
+ @import ' ../node_modules/react-toastify/dist/ReactToastify.min.css' ;
Original file line number Diff line number Diff line change @@ -3,7 +3,6 @@ import React from 'react'
3
3
import { storiesOf } from '@storybook/react'
4
4
5
5
import { TextField } from '../src'
6
- import 'bootstrap/dist/css/bootstrap.min.css'
7
6
8
7
storiesOf ( 'TextField' , module )
9
8
. addParameters ( {
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ import { storiesOf } from '@storybook/react'
4
4
5
5
import Button from 'react-bootstrap/Button'
6
6
import { Toast , Toaster } from '../src'
7
- import 'bootstrap/dist/css/bootstrap.min.css'
8
- import 'react-toastify/dist/ReactToastify.min.css'
9
7
10
8
storiesOf ( 'Toaster' , module )
11
9
. addParameters ( {
Original file line number Diff line number Diff line change
1
+ const postcss = require ( 'rollup-plugin-postcss' )
2
+ const autoprefixer = require ( 'autoprefixer' )
3
+ const cssnano = require ( 'cssnano' )
4
+
5
+ module . exports = {
6
+ rollup ( config , options ) {
7
+ config . plugins . push (
8
+ postcss ( {
9
+ plugins : [
10
+ autoprefixer ( ) ,
11
+ cssnano ( {
12
+ preset : 'default' ,
13
+ } ) ,
14
+ ] ,
15
+ inject : false ,
16
+ // only write out CSS for the first bundle (avoids pointless extra files):
17
+ extract : ! ! options . writeMeta ,
18
+ modules : true ,
19
+ } ) ,
20
+ )
21
+ return config
22
+ } ,
23
+ }
You can’t perform that action at this time.
0 commit comments