@@ -14,7 +14,6 @@ import transformRuntime from '@babel/plugin-transform-runtime';
1414import babelPresetEnv from '@babel/preset-env' ;
1515import babelPresetReact from '@babel/preset-react' ;
1616import babelPresetTypescript from '@babel/preset-typescript' ;
17- import babelPluginReactCssModules from 'babel-plugin-react-css-modules' ;
1817import * as babelPluginReactHotLoader from 'react-hot-loader/babel' ;
1918import * as _ from 'lodash' ;
2019import { babelPluginReactWrappedDisplayName } from './babel-plugin-react-wrapped-display-name' ;
@@ -32,6 +31,7 @@ export function getBabelOptions(options?: Partial<DefaultOptions>) {
3231 return {
3332 babelrc : false ,
3433 comments : globalState . isDevelopment ,
34+ cacheDirectory : true ,
3535 presets : [ [ babelPresetEnv , { modules : mergedOptions . modules } ] , [ babelPresetReact ] , [ babelPresetTypescript ] ] ,
3636 plugins : [
3737 [ transformRuntime ] ,
@@ -49,24 +49,6 @@ export function getBabelOptions(options?: Partial<DefaultOptions>) {
4949 [ babelPluginProposalClassProperties , { loose : true } ] ,
5050 [ babelPluginProposalJsonStrings ] ,
5151 [ babelPluginProposalOptionalCatchBinding ] ,
52- // TODO: gulp don't support css module
53- ...( globalState && globalState . sourceConfig && globalState . sourceConfig . type === 'project'
54- ? [
55- [
56- babelPluginReactCssModules ,
57- {
58- filetypes : {
59- '.scss' : {
60- syntax : 'postcss-scss' ,
61- } ,
62- '.less' : {
63- syntax : 'postcss-less' ,
64- } ,
65- } ,
66- } ,
67- ] ,
68- ]
69- : [ ] ) ,
7052 ...mergedOptions . plugins ,
7153 ] ,
7254 } ;
0 commit comments