-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathconfig-overrides.js
35 lines (29 loc) · 921 Bytes
/
config-overrides.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
const path = require("path");
const { override, addPostcssPlugins } = require("customize-cra");
//const WasmPackPlugin = require("@wasm-tool/wasm-pack-plugin");
module.exports = override(
// Ignore wasm files on file loader
(config) => {
config.module.rules.find((rule) => {
return (rule.oneOf || []).find((item) => {
if (item.loader && item.loader.indexOf("file-loader") >= 0) {
item.exclude.push(/\.wasm$/);
return true;
}
});
});
return config;
},
//// Hook canvas Rust-WASM module
//config => {
//config.plugins = (config.plugins || []).concat([
//new WasmPackPlugin({
//crateDirectory: path.resolve(__dirname, "./src/tilemap"),
//extraArgs: "--no-typescript",
//outDir: path.resolve(__dirname, "./src/tilemap/pkg")
//})
//]);
//return config;
//},
addPostcssPlugins([require("tailwindcss"), require("autoprefixer")])
);