mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-31 08:25:36 +00:00
Merge pull request #799 from balena-io/update-webpack
Update to webpack 4
This commit is contained in:
commit
4be44905aa
1069
package-lock.json
generated
1069
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@ -29,8 +29,8 @@
|
|||||||
"node": "^6.13.1"
|
"node": "^6.13.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/bluebird": "^3.5.20",
|
"@types/bluebird": "^3.5.25",
|
||||||
"@types/dockerode": "^2.5.9",
|
"@types/dockerode": "^2.5.10",
|
||||||
"@types/event-stream": "^3.3.34",
|
"@types/event-stream": "^3.3.34",
|
||||||
"@types/express": "^4.11.1",
|
"@types/express": "^4.11.1",
|
||||||
"@types/knex": "^0.14.14",
|
"@types/knex": "^0.14.14",
|
||||||
@ -38,7 +38,7 @@
|
|||||||
"@types/lodash": "^4.14.109",
|
"@types/lodash": "^4.14.109",
|
||||||
"@types/memoizee": "^0.4.2",
|
"@types/memoizee": "^0.4.2",
|
||||||
"@types/mz": "0.0.32",
|
"@types/mz": "0.0.32",
|
||||||
"@types/node": "^10.3.1",
|
"@types/node": "^10.12.17",
|
||||||
"@types/request": "^2.48.1",
|
"@types/request": "^2.48.1",
|
||||||
"@types/rwlock": "^5.0.2",
|
"@types/rwlock": "^5.0.2",
|
||||||
"@types/shell-quote": "^1.6.0",
|
"@types/shell-quote": "^1.6.0",
|
||||||
@ -59,7 +59,7 @@
|
|||||||
"duration-js": "^4.0.0",
|
"duration-js": "^4.0.0",
|
||||||
"event-stream": "3.3.5",
|
"event-stream": "3.3.5",
|
||||||
"express": "^4.0.0",
|
"express": "^4.0.0",
|
||||||
"husky": "^1.1.3",
|
"husky": "^1.3.0",
|
||||||
"istanbul": "^0.4.5",
|
"istanbul": "^0.4.5",
|
||||||
"json-mask": "^0.3.8",
|
"json-mask": "^0.3.8",
|
||||||
"knex": "~0.15.2",
|
"knex": "~0.15.2",
|
||||||
@ -84,10 +84,10 @@
|
|||||||
"rimraf": "^2.6.2",
|
"rimraf": "^2.6.2",
|
||||||
"rwlock": "^5.0.0",
|
"rwlock": "^5.0.0",
|
||||||
"shell-quote": "^1.6.1",
|
"shell-quote": "^1.6.1",
|
||||||
"ts-loader": "^3.5.0",
|
"ts-loader": "^5.3.0",
|
||||||
"typed-error": "^2.0.0",
|
"typed-error": "^2.0.0",
|
||||||
"typescript": "^3.1.6",
|
"typescript": "^3.1.6",
|
||||||
"uglifyjs-webpack-plugin": "^1.0.1",
|
"webpack": "^4.25.0",
|
||||||
"webpack": "^3.0.0"
|
"webpack-cli": "^3.1.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ var path = require('path');
|
|||||||
var fs = require('fs');
|
var fs = require('fs');
|
||||||
var _ = require('lodash');
|
var _ = require('lodash');
|
||||||
var path = require('path');
|
var path = require('path');
|
||||||
var UglifyPlugin = require("uglifyjs-webpack-plugin");
|
|
||||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
var externalModules = [
|
var externalModules = [
|
||||||
@ -54,9 +53,6 @@ console.log('Using the following dependencies as external:', externalModules);
|
|||||||
|
|
||||||
module.exports = function (env) {
|
module.exports = function (env) {
|
||||||
let plugins = [
|
let plugins = [
|
||||||
new webpack.DefinePlugin({
|
|
||||||
'process.env.NODE_ENV': '"production"',
|
|
||||||
}),
|
|
||||||
new CopyWebpackPlugin([
|
new CopyWebpackPlugin([
|
||||||
{
|
{
|
||||||
from: './src/migrations',
|
from: './src/migrations',
|
||||||
@ -68,10 +64,8 @@ module.exports = function (env) {
|
|||||||
path.resolve(__dirname, 'src/migrations')
|
path.resolve(__dirname, 'src/migrations')
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
if (env == null || !env.noOptimize) {
|
|
||||||
plugins.push(new UglifyPlugin())
|
|
||||||
}
|
|
||||||
return {
|
return {
|
||||||
|
mode: env == null || !env.noOptimize ? 'production' : 'development',
|
||||||
entry: './src/app.coffee',
|
entry: './src/app.coffee',
|
||||||
output: {
|
output: {
|
||||||
filename: 'app.js',
|
filename: 'app.js',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user