18 Star 132 Fork 59

Gitee 极速下载/scratch

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/LLK/scratch-desktop
克隆/下载
webpack.renderer.js 1.94 KB
一键复制 编辑 原始数据 按行查看 历史
Andy O'Neill 提交于 2023-07-24 10:18 . feat: high contrast support
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const makeConfig = require('./webpack.makeConfig.js');
const getModulePath = moduleName => path.dirname(require.resolve(`${moduleName}/package.json`));
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: path.join(getModulePath('scratch-blocks'), 'media'),
to: 'static/blocks-media/default'
},
{
from: path.join(getModulePath('scratch-blocks'), 'media'),
to: 'static/blocks-media/high-contrast'
},
{
from: path.join(getModulePath('scratch-gui'),
'src', 'lib', 'themes', 'high-contrast', 'blocks-media'),
to: 'static/blocks-media/high-contrast',
force: true
},
{
from: 'extension-worker.{js,js.map}',
context: path.join(getModulePath('scratch-vm'), 'dist', 'web')
},
{
from: path.join(getModulePath('scratch-gui'), 'src', 'lib', 'libraries', '*.json'),
to: 'static/libraries',
flatten: true
}
])
]
}
);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/scratch.git
git@gitee.com:mirrors/scratch.git
mirrors
scratch
scratch
develop

搜索帮助