33 lines
690 B
JavaScript
33 lines
690 B
JavaScript
const CracoLessPlugin = require('./craco-less');
|
|
|
|
module.exports = {
|
|
plugins: [
|
|
{
|
|
plugin: CracoLessPlugin,
|
|
options: {
|
|
lessLoaderOptions: {
|
|
lessOptions: {
|
|
javascriptEnabled: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
webpack: {
|
|
configure: (config) => {
|
|
config.resolve.extensions.push('.wasm');
|
|
|
|
config.module.rules.forEach(rule => {
|
|
(rule.oneOf || []).forEach(oneOf => {
|
|
if (oneOf.loader && oneOf.loader.indexOf('file-loader') >= 0) {
|
|
// Make file-loader ignore WASM files
|
|
oneOf.exclude.push(/\.wasm$/);
|
|
}
|
|
});
|
|
});
|
|
|
|
return config;
|
|
},
|
|
},
|
|
};
|