refactor: add icons package (#1078)

This commit is contained in:
Mo
2022-06-09 14:55:00 -05:00
committed by GitHub
parent e15441c8f7
commit 640e9a9c07
250 changed files with 3317 additions and 2507 deletions

View File

@@ -0,0 +1,46 @@
const path = require('path')
module.exports = () => {
return {
entry: './src/index.ts',
mode: 'production',
devtool: 'source-map',
optimization: {
minimize: false,
},
output: {
filename: 'index.js',
},
resolve: {
fallback: {
crypto: false,
path: false,
},
extensions: ['.js', '.jsx', '.ts'],
},
module: {
rules: [
{
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
{
test: /\.svg$/i,
use: [{ loader: '@svgr/webpack', options: { babel: false } }],
},
],
},
plugins: [
new (require('copy-webpack-plugin'))({
patterns: [
{
from: '**/*.svg',
to: 'mobile-exports',
context: path.resolve(__dirname, 'src', 'Icons'),
},
],
}),
],
}
}