webpack2 yo

This commit is contained in:
Daniel J 2016-06-22 16:30:10 +02:00
parent a4804519c0
commit 07107411a3
5 changed files with 11 additions and 8 deletions

View file

@ -29,8 +29,11 @@ let watchOpts = {
} }
if (inProduction) { if (inProduction) {
webpackConfig.plugins.push(new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
}))
webpackConfig.plugins.push(new webpack.optimize.DedupePlugin()) webpackConfig.plugins.push(new webpack.optimize.DedupePlugin())
webpackConfig.plugins.push(new webpack.optimize.OccurenceOrderPlugin(false))
webpackConfig.plugins.push(new webpack.optimize.UglifyJsPlugin({ webpackConfig.plugins.push(new webpack.optimize.UglifyJsPlugin({
compress: { compress: {
warnings: false, warnings: false,

View file

@ -21,7 +21,7 @@
"babel-core": "^6.9.1", "babel-core": "^6.9.1",
"babel-loader": "^6.2.4", "babel-loader": "^6.2.4",
"babel-plugin-transform-strict-mode": "^6.8.0", "babel-plugin-transform-strict-mode": "^6.8.0",
"babel-preset-es2015": "^6.9.0", "babel-preset-es2015-webpack": "^6.4.1",
"babel-preset-node6": "^11.0.0", "babel-preset-node6": "^11.0.0",
"del": "^2.2.0", "del": "^2.2.0",
"exports-loader": "^0.6.3", "exports-loader": "^0.6.3",
@ -38,7 +38,7 @@
"standard": "^7.1.2", "standard": "^7.1.2",
"stylus": "^0.54.5", "stylus": "^0.54.5",
"stylus-loader": "^2.1.1", "stylus-loader": "^2.1.1",
"webpack": "^1.13.1" "webpack": "^2.1.0-beta.13"
}, },
"standard": { "standard": {
"env": { "env": {

View file

@ -1,5 +1,4 @@
/* global chrome, safari */ /* global chrome, safari */
'use strict'
function fetch (url, cb, type) { function fetch (url, cb, type) {
if (url.indexOf('//') === 0) { if (url.indexOf('//') === 0) {

View file

@ -1,5 +1,4 @@
/* global chrome, safari */ /* global chrome, safari */
'use strict'
import JSZip from 'jszip' import JSZip from 'jszip'
import m from 'mithril' import m from 'mithril'

View file

@ -18,8 +18,7 @@ export default {
{ {
test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: { test: /\.js$/, loader: 'babel', exclude: /node_modules/, query: {
sourceMaps: inProduction, sourceMaps: inProduction,
presets: ['es2015'], presets: ['es2015-webpack']
plugins: ['transform-strict-mode']
} }
}, },
{ {
@ -34,7 +33,10 @@ export default {
resolve: { resolve: {
extensions: ['', '.js', '.json', '.styl'], extensions: ['', '.js', '.json', '.styl'],
root: [path.join(__dirname, '/src')] modules: [
path.resolve('./src'),
'node_modules'
]
}, },
plugins: [], plugins: [],