forked from callstack/react-native-paper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocusaurus-react-native-plugin.js
More file actions
32 lines (31 loc) · 959 Bytes
/
Copy pathdocusaurus-react-native-plugin.js
File metadata and controls
32 lines (31 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
const path = require('path');
const webpack = require('webpack');
module.exports = function () {
return {
name: 'docusaurus-react-native-plugin',
configureWebpack() {
return {
mergeStrategy: { 'resolve.extensions': 'prepend' },
resolve: {
alias: {
react: path.resolve('node_modules/react'),
'react-native$': 'react-native-web',
'react-native-paper': path.resolve('../src'),
'react-native-vector-icons/MaterialCommunityIcons': path.resolve(
'node_modules/@react-native-vector-icons/material-design-icons'
),
},
extensions: ['.web.js'],
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser.js',
}),
new webpack.DefinePlugin({
__DEV__: JSON.stringify(process.env.NODE_ENV !== 'production'),
}),
],
};
},
};
};