mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2025-07-13 13:24:14 -04:00
Instead of overriding rules we don't want by matching the test exactly, we now explicitly delete rules we don't want before adding any of our custom rules.
24 lines
738 B
JavaScript
24 lines
738 B
JavaScript
const path = require('path');
|
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
|
|
const makeConfig = require('./webpack.makeConfig.js');
|
|
|
|
module.exports = defaultConfig =>
|
|
makeConfig(
|
|
defaultConfig,
|
|
{
|
|
name: 'renderer',
|
|
useReact: true,
|
|
disableDefaultRulesForExtensions: ['js', 'jsx', 'css', 'svg', 'png', 'wav', 'gif', 'jpg'],
|
|
babelPaths: [
|
|
path.resolve(__dirname, 'src', 'renderer')
|
|
],
|
|
plugins: [
|
|
new CopyWebpackPlugin([{
|
|
from: path.resolve(__dirname, 'node_modules', 'scratch-gui', 'dist', 'static'),
|
|
to: 'static'
|
|
}])
|
|
]
|
|
}
|
|
);
|