-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcraco.config.js
31 lines (29 loc) · 947 Bytes
/
craco.config.js
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
const { loaderByName, addBeforeLoader } = require("@craco/craco");
module.exports = {
webpack: {
alias: {
"react-dom": "@hot-loader/react-dom"
},
configure: (webpackConfig, { env, paths }) => {
const csvLoader = {
test: /\.csv$/,
loader: 'csv-loader',
options: {
header: true,
skipEmptyLines: true
}
};
const jsonLoader = {
test: /\.json$/,
loader: 'json-loader'
};
//addBeforeLoader(webpackConfig, loaderByName("file-loader"), jsonLoader );
addBeforeLoader(webpackConfig, loaderByName("file-loader"), csvLoader );
return webpackConfig;
}
},
plugins: [
{ plugin: require("craco-plugin-react-hot-reload") },
{ plugin: require("craco-cesium")() }
]
};