Skip to content

Commit

Permalink
chore(build): webpack fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
polonel committed Feb 20, 2022
1 parent e667cea commit f16267b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trudesk",
"version": "1.1.11",
"version": "1.2-tango",
"private": true,
"engines": {
"node": ">=9.10.0"
Expand All @@ -16,7 +16,7 @@
"codacy": "istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- --recursive -R spec && cat ./coverage/lcov.info | cross-env CODACY_PROJECT_TOKEN=65070aca43cc4fba96eaabd4033c9528 codacy-coverage && rm -rf ./coverage",
"webpackwatch": "webpack --config webpack.config.js --watch",
"webpackdev": "webpack --config webpack.config.js",
"webpackdist": "rimraf public/js/* && webpack --env.production -p --config webpack.config.js",
"webpackdist": "rimraf public/js/* && webpack --env production --node-env production --config webpack.config.js",
"snyk-protect": "snyk protect"
},
"dependencies": {
Expand Down
12 changes: 9 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,11 @@ module.exports = {
module: {
rules: [
{ test: /angular\.min\.js/, loader: 'exports-loader', options: { type: 'commonjs', exports: 'single angular' } },
{ test: /uikit_combined\.min\.js/, loader: 'exports-loader', options: { type: 'commonjs', exports: 'single UIkit'} },
{
test: /uikit_combined\.min\.js/,
loader: 'exports-loader',
options: { type: 'commonjs', exports: 'single UIkit' }
},
{
test: /\.sass$/,
exclude: path.resolve(__dirname, 'node_modules'),
Expand Down Expand Up @@ -155,9 +159,11 @@ module.exports = {
new TerserPlugin({
parallel: true,
terserOptions: {
format: { comments: false },
ecma: 6,
mangle: false
}
},
extractComments: false
})
],
splitChunks: {
Expand Down Expand Up @@ -192,7 +198,7 @@ module.exports = {
'window.moment': 'moment',
setImmediate: 'async'
}),
new webpack.IgnorePlugin({ resourceRegExp: /^\.\/locale$/}),
new webpack.IgnorePlugin({ resourceRegExp: /^\.\/locale$/ }),
new MiniCssExtractPlugin({
filename: 'app.min.css'
})
Expand Down

0 comments on commit f16267b

Please sign in to comment.