forked from globalfund/data-explorer-client
-
Notifications
You must be signed in to change notification settings - Fork 2
/
craco.config.js
49 lines (44 loc) · 1.08 KB
/
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
module.exports = () => {
const babelPlugins = ["babel-plugin-styled-components"];
if (process.env.NODE_ENV === "production") {
babelPlugins.push([
"transform-remove-console",
{ exclude: ["error", "warn"] },
]);
}
return {
eslint: {
enable: false,
},
webpack: {
alias: {
// 'react-dom': '@hot-loader/react-dom',
"react/jsx-dev-runtime": "react/jsx-dev-runtime.js",
"react/jsx-runtime": "react/jsx-runtime.js",
},
plugins: [
// new StyleLintPlugin({
// configBasedir: __dirname,
// context: path.resolve(__dirname, 'src'),
// files: ['**/*.tsx', '**/*.ts'],
// }),
// new WebpackPluginRamdisk(),
],
loaders: [
{
test: /plugin\.css$/,
loaders: ['style-loader', 'css'],
},
],
},
babel: {
plugins: babelPlugins,
loaderOptions: {
ignore: ["./node_modules/mapbox-gl/dist/mapbox-gl.js"],
},
},
webpackDevServer: {
port: process.env.PORT || 3000,
},
};
};