|
|
|
@ -22,6 +22,7 @@ const CompressionPlugin = require('compression-webpack-plugin'); |
|
|
|
const webpack = require('webpack'); |
|
|
|
const path = require('path'); |
|
|
|
const dirTree = require('directory-tree'); |
|
|
|
const jsonminify = require("jsonminify"); |
|
|
|
|
|
|
|
const PUBLIC_RESOURCE_PATH = '/static/'; |
|
|
|
|
|
|
|
@ -53,8 +54,18 @@ module.exports = { |
|
|
|
moment: "moment" |
|
|
|
}), |
|
|
|
new CopyWebpackPlugin([ |
|
|
|
{ from: './src/thingsboard.ico', to: 'thingsboard.ico'}, |
|
|
|
{ from: './src/app/locale', to: 'locale' } |
|
|
|
{ |
|
|
|
from: './src/thingsboard.ico', |
|
|
|
to: 'thingsboard.ico' |
|
|
|
}, |
|
|
|
{ |
|
|
|
from: './src/app/locale', |
|
|
|
to: 'locale', |
|
|
|
ignore: [ '*.js' ], |
|
|
|
transform: function(content, path) { |
|
|
|
return Buffer.from(jsonminify(content.toString())); |
|
|
|
} |
|
|
|
} |
|
|
|
]), |
|
|
|
new HtmlWebpackPlugin({ |
|
|
|
template: './src/index.html', |
|
|
|
|