forked from TwoAbove/noita-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
craco.config.js
48 lines (43 loc) · 1.14 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
const path = require('path');
const util = require('util');
const fs = require('fs');
const CracoSwcPlugin = require('craco-swc');
const { addBeforeLoader, loaderByName } = require('@craco/craco');
const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier');
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
.BundleAnalyzerPlugin;
module.exports = {
webpack: {
configure: config => {
// setUpWorker(config);
// https://stackoverflow.com/questions/65922329/babel-cant-resolve-imports-in-it-its-own-source-code
config.module.rules.push({
test: /\.m?js/,
resolve: {
fullySpecified: false
}
});
config.experiments = {
futureDefaults: true,
asyncWebAssembly: true
};
config.resolve.fallback = { path: false, fs: false };
return config;
},
plugins: [
new BundleAnalyzerPlugin({
analyzerMode: process.env.STATS || 'disabled'
})
]
// stats: 'errors-only',
},
plugins: [{ plugin: CracoSwcPlugin }]
// style: {
// postcss: {
// plugins: [
// require("tailwindcss")("./tailwind.config.js"),
// require('autoprefixer'),
// ],
// },
// },
};