Upgraded webpack
This commit is contained in:
parent
869af1f1c5
commit
d1815530aa
7 changed files with 2197 additions and 957 deletions
File diff suppressed because one or more lines are too long
3123
package-lock.json
generated
3123
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -4,7 +4,7 @@
|
|||
"description": "ISO 639-1 languages and ISO 3166-1 countries translated in 89 languages",
|
||||
"main": "./lib/iso-countries-languages.js",
|
||||
"scripts": {
|
||||
"build": "NODE_ENV=production webpack --progress --optimize-minimize"
|
||||
"build": "NODE_ENV=production webpack --progress"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -13,9 +13,10 @@
|
|||
"author": "Luca Tagliaferri",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"json-loader": "^0.5.4",
|
||||
"json-loader": "^0.5.7",
|
||||
"lzstring-loader": "^0.2.0",
|
||||
"webpack": "1.13.3"
|
||||
"webpack": "^4.29.0",
|
||||
"webpack-cli": "^3.2.1"
|
||||
},
|
||||
"dependencies": {}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,6 @@ for (const lang of supportedLangs) {
|
|||
obj.countries[lang] = require(`../res/countries/${lang}`);
|
||||
}
|
||||
|
||||
fs.writeFileSync(`../src/packagedJson.json`,
|
||||
fs.writeFileSync(`../src/packagedJson.json.icl`,
|
||||
JSON.stringify(obj));
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
var packagedJson = JSON.parse(require('lzstring!./packagedJson.json'));
|
||||
var supportedLangs = require('json!./supportedLangs.json');
|
||||
var packagedJson = JSON.parse(require('lzstring-loader!./packagedJson.json.icl'));
|
||||
var supportedLangs = require('./supportedLangs.json');
|
||||
|
||||
/**
|
||||
* Returns the list of supported languages
|
||||
|
|
|
@ -2,26 +2,23 @@ var path = require('path');
|
|||
var webpack = require('webpack');
|
||||
|
||||
module.exports = {
|
||||
mode: "production",
|
||||
entry: './src/index.js',
|
||||
extensions: ['', '.js', '.json'],
|
||||
resolve: {
|
||||
extensions: [ '.js','.json'],
|
||||
},
|
||||
output: {
|
||||
path: './lib',
|
||||
path: path.resolve(__dirname, "lib"), // string
|
||||
filename: 'iso-countries-languages.js',
|
||||
library: 'IsoCountriesLanguages',
|
||||
libraryTarget: 'umd'
|
||||
},
|
||||
plugins: [
|
||||
|
||||
],
|
||||
module: {
|
||||
loaders: [
|
||||
|
||||
]
|
||||
},
|
||||
externals: [
|
||||
|
||||
],
|
||||
resolve: {
|
||||
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue