mirror of
https://github.com/scratchfoundation/scratch-desktop.git
synced 2024-12-22 21:52:31 -05:00
cca18b6d67
These files are no longer listed as dependencies of scratch-desktop so we need to reach into scratch-gui to get them. We should find a better solution but this will work for now.
36 lines
1.3 KiB
JavaScript
36 lines
1.3 KiB
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', 'ttf'],
|
|
babelPaths: [
|
|
path.resolve(__dirname, 'src', 'renderer'),
|
|
/node_modules[\\/]+scratch-[^\\/]+[\\/]+src/,
|
|
/node_modules[\\/]+pify/,
|
|
/node_modules[\\/]+@vernier[\\/]+godirect/
|
|
],
|
|
plugins: [
|
|
new CopyWebpackPlugin([{
|
|
from: 'node_modules/scratch-gui/node_modules/scratch-blocks/media',
|
|
to: 'static/blocks-media'
|
|
}]),
|
|
new CopyWebpackPlugin([{
|
|
from: 'extension-worker.{js,js.map}',
|
|
context: 'node_modules/scratch-vm/dist/web'
|
|
}]),
|
|
new CopyWebpackPlugin([{
|
|
from: 'node_modules/scratch-gui/src/lib/libraries/*.json',
|
|
to: 'static/libraries',
|
|
flatten: true
|
|
}])
|
|
]
|
|
}
|
|
);
|