Fix sticker-creator
This commit is contained in:
parent
f720904ca5
commit
419d1ca176
2 changed files with 15 additions and 0 deletions
|
@ -444,6 +444,7 @@
|
||||||
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts,.snyk-*.flag,benchmark}",
|
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme,test,__tests__,tests,powered-test,example,examples,*.d.ts,.snyk-*.flag,benchmark}",
|
||||||
"!**/node_modules/.bin",
|
"!**/node_modules/.bin",
|
||||||
"!**/node_modules/**/build/**",
|
"!**/node_modules/**/build/**",
|
||||||
|
"node_modules/intl-tel-input/build/**",
|
||||||
"!**/node_modules/**/prebuilds/**",
|
"!**/node_modules/**/prebuilds/**",
|
||||||
"!**/*.{o,hprof,orig,pyc,pyo,rbc}",
|
"!**/*.{o,hprof,orig,pyc,pyo,rbc}",
|
||||||
"!**/._*",
|
"!**/._*",
|
||||||
|
|
|
@ -5,6 +5,7 @@ import { resolve } from 'path';
|
||||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||||
import { Configuration, EnvironmentPlugin, ProvidePlugin } from 'webpack';
|
import { Configuration, EnvironmentPlugin, ProvidePlugin } from 'webpack';
|
||||||
import HtmlWebpackPlugin = require('html-webpack-plugin');
|
import HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||||
|
import TerserPlugin = require('terser-webpack-plugin');
|
||||||
|
|
||||||
const context = __dirname;
|
const context = __dirname;
|
||||||
const { NODE_ENV: mode = 'development' } = process.env;
|
const { NODE_ENV: mode = 'development' } = process.env;
|
||||||
|
@ -34,6 +35,19 @@ const stickerCreatorConfig: Configuration = {
|
||||||
'typeface-inter',
|
'typeface-inter',
|
||||||
'./sticker-creator/index.tsx',
|
'./sticker-creator/index.tsx',
|
||||||
],
|
],
|
||||||
|
// Stack-traces have to be readable so don't mangle function names.
|
||||||
|
optimization: {
|
||||||
|
minimizer: [
|
||||||
|
new TerserPlugin({
|
||||||
|
parallel: true,
|
||||||
|
terserOptions: {
|
||||||
|
mangle: false,
|
||||||
|
keep_classnames: true,
|
||||||
|
keep_fnames: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
},
|
||||||
output: {
|
output: {
|
||||||
path: resolve(context, 'sticker-creator/dist'),
|
path: resolve(context, 'sticker-creator/dist'),
|
||||||
filename: 'bundle.js',
|
filename: 'bundle.js',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue