scratch-desktop/webpack.renderer.js
Christopher Willis-Ford 78d75dc3cf assume direct control of webpack config
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.
2020-08-11 17:17:15 -07:00

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'
}])
]
}
);