Skip to content

Commit

Permalink
site: update config syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
benjycui committed Sep 22, 2017
1 parent c419a1d commit e8f61f1
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions site/bisheng.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,19 +68,17 @@ module.exports = {
};

if (usePreact) {
config.resolve.alias = {
...config.resolve.alias,
config.resolve.alias = Object.assign({}, config.resolve.alias, {
react: 'preact-compat',
'react-dom': 'preact-compat',
'create-react-class': 'preact-compat/lib/create-react-class',
'react-router': 'react-router',
};
});
} else {
config.externals = {
...config.externals,
config.externals = Object.assign({}, config.externals, {
react: 'React',
'react-dom': 'ReactDOM',
};
});
}

config.babel.plugins.push([
Expand Down

0 comments on commit e8f61f1

Please sign in to comment.