monaca-lib
Advanced tools
Comparing version 2.7.6 to 2.7.7
@@ -5,2 +5,6 @@ | ||
v2.7.7 | ||
---- | ||
* Modified `webpack` development configuration to generate files to `www` directory | ||
v2.7.6 | ||
@@ -7,0 +11,0 @@ ---- |
{ | ||
"name": "monaca-lib", | ||
"version": "2.7.6", | ||
"version": "2.7.7", | ||
"description": "Monaca cloud and localkit API bindings for JavaScript", | ||
@@ -85,4 +85,6 @@ "main": "./src/main.js", | ||
"webpack": "1.13.1", | ||
"webpack-dev-server": "1.14.1" | ||
"webpack-dev-server": "1.14.1", | ||
"write-file-webpack-plugin": "4.3.2", | ||
"script-ext-html-webpack-plugin": "2.0.1" | ||
} | ||
} |
@@ -15,2 +15,5 @@ try { | ||
// Writing files to the output directory (www) during development | ||
var CopyWebpackPlugin = require(path.join(cordovaNodeModules, 'copy-webpack-plugin')); | ||
var WriteFileWebpackPlugin = require(path.join(cordovaNodeModules, 'write-file-webpack-plugin')); | ||
} catch (e) { | ||
@@ -34,4 +37,5 @@ throw new Error('Missing Webpack Build Dependencies.'); | ||
path: path.join(__dirname, 'www'), | ||
filename: '[name].js', | ||
chunkFilename: '[id].chunk.js' | ||
filename: '[name].bundle.js', | ||
chunkFilename: '[id].chunk.js', | ||
publicPath: './' | ||
}, | ||
@@ -118,5 +122,19 @@ | ||
template: 'src/public/index.html.ejs', | ||
chunksSortMode: 'dependency' | ||
chunksSortMode: 'dependency', | ||
minify: { | ||
caseSensitive: true, | ||
collapseWhitespace: true, | ||
conservativeCollapse: true, | ||
removeAttributeQuotes: false, | ||
removeComments: true | ||
} | ||
}), | ||
new ProgressBarPlugin() | ||
new ProgressBarPlugin(), | ||
new WriteFileWebpackPlugin({ | ||
test: /^(?!.*(watch\.bundle\.js|hot)).*/, | ||
}), | ||
new CopyWebpackPlugin([{ | ||
from: path.join(__dirname, 'src', 'public'), | ||
ignore: ['index.html.ejs'] | ||
}]) | ||
], | ||
@@ -123,0 +141,0 @@ |
@@ -15,2 +15,7 @@ try { | ||
// Writing files to the output directory (www) during development | ||
var CopyWebpackPlugin = require(path.join(cordovaNodeModules, 'copy-webpack-plugin')); | ||
var WriteFileWebpackPlugin = require(path.join(cordovaNodeModules, 'write-file-webpack-plugin')); | ||
var ScriptExtHtmlWebpackPlugin = require(path.join(cordovaNodeModules, 'script-ext-html-webpack-plugin')); | ||
} catch (e) { | ||
@@ -26,12 +31,12 @@ throw new Error('Missing Webpack Build Dependencies.'); | ||
entry: [ | ||
'react-hot-loader/patch', | ||
'webpack/hot/only-dev-server', | ||
'./src/main' | ||
], | ||
entry: { | ||
watch: ['react-hot-loader/patch', 'webpack/hot/only-dev-server'], | ||
vendor: ['react', 'react-dom', 'onsenui', 'react-onsenui'], | ||
app: ['./src/main'] | ||
}, | ||
output: { | ||
path: path.join(__dirname, 'www'), | ||
filename: 'bundle.js', | ||
publicPath: '/' | ||
filename: '[name].bundle.js', | ||
chunkFilename: '[name].chunk.js' | ||
}, | ||
@@ -114,8 +119,34 @@ | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
name: ['vendor'] | ||
}), | ||
new ExtractTextPlugin('[name].css'), | ||
new HtmlWebpackPlugin({ | ||
template: 'src/public/index.html.ejs', | ||
chunksSortMode: 'dependency' | ||
chunksSortMode: 'dependency', | ||
minify: { | ||
caseSensitive: true, | ||
collapseWhitespace: true, | ||
conservativeCollapse: true, | ||
removeAttributeQuotes: true, | ||
removeComments: true | ||
} | ||
}), | ||
new ProgressBarPlugin() | ||
new ScriptExtHtmlWebpackPlugin({ | ||
custom: [ | ||
{ | ||
test: 'watch.bundle.js', | ||
attribute: 'src', | ||
value: '/watch.bundle.js' //append the /watch.bundle.js for webpack-dev-server | ||
}, | ||
] | ||
}), | ||
new ProgressBarPlugin(), | ||
new WriteFileWebpackPlugin({ | ||
test: /^(?!.*(watch\.bundle\.js|hot)).*/, | ||
}), | ||
new CopyWebpackPlugin([{ | ||
from: path.join(__dirname, 'src', 'public'), | ||
ignore: ['index.html.ejs'] | ||
}]) | ||
], | ||
@@ -122,0 +153,0 @@ |
@@ -15,2 +15,5 @@ try { | ||
// Writing files to the output directory (www) during development | ||
var CopyWebpackPlugin = require(path.join(cordovaNodeModules, 'copy-webpack-plugin')); | ||
var WriteFileWebpackPlugin = require(path.join(cordovaNodeModules, 'write-file-webpack-plugin')); | ||
} catch (e) { | ||
@@ -26,11 +29,13 @@ throw new Error('Missing Webpack Build Dependencies.'); | ||
entry: [ | ||
'webpack/hot/only-dev-server', | ||
'./src/main' | ||
], | ||
entry: { | ||
watch: ['webpack/hot/only-dev-server'], | ||
app: ['./src/main'], | ||
vendor: ['vue'] | ||
}, | ||
output: { | ||
path: path.join(__dirname, 'www'), | ||
filename: 'bundle.js', | ||
publicPath:'/' | ||
filename: '[name].bundle.js', | ||
chunkFilename: '[name].chunk.js', | ||
publicPath:'./' | ||
}, | ||
@@ -112,8 +117,25 @@ | ||
new webpack.HotModuleReplacementPlugin(), | ||
new webpack.optimize.CommonsChunkPlugin({ | ||
name: ['app', 'vendor'] | ||
}), | ||
new ExtractTextPlugin('[name].css'), | ||
new HtmlWebpackPlugin({ | ||
template: 'src/public/index.html.ejs', | ||
chunksSortMode: 'dependency' | ||
chunksSortMode: 'dependency', | ||
minify: { | ||
caseSensitive: true, | ||
collapseWhitespace: true, | ||
conservativeCollapse: true, | ||
removeAttributeQuotes: true, | ||
removeComments: true | ||
} | ||
}), | ||
new ProgressBarPlugin() | ||
new ProgressBarPlugin(), | ||
new WriteFileWebpackPlugin({ | ||
test: /^(?!.*(watch\.bundle\.js|hot)).*/, | ||
}), | ||
new CopyWebpackPlugin([{ | ||
from: path.join(__dirname, 'src', 'public'), | ||
ignore: ['index.html.ejs'] | ||
}]) | ||
], | ||
@@ -120,0 +142,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32134987
193432
116