diff --git a/package.json b/package.json index c96fe71b..88bdcf47 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tablefilter", - "version": "0.4.38", + "version": "0.4.39", "description": "A Javascript library making HTML tables filterable and a bit more", "license": "MIT", "author": { @@ -64,7 +64,7 @@ "script-loader": "^0.7.0", "string-replace-webpack-plugin": "^0.0.5", "sugar-date": "2.0.4", - "webpack": "^1.14.0", + "webpack": "^2.2.0", "webpack-dev-server": "^1.16.2" }, "dependencies": {}, diff --git a/webpack.config.js b/webpack.config.js index ca004e38..f01cb89d 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -18,13 +18,13 @@ module.exports = { libraryTarget: 'umd' }, resolve: { - extensions: ['', '.js'], + extensions: ['.js'], alias: { sortabletable: '../../../libs/sortabletable.js' } }, module: { - loaders: [ + rules: [ { test: path.join(__dirname, 'src'), exclude: /tablefilter\/node_modules/, @@ -66,20 +66,22 @@ module.exports = { warnings: false } }), - new webpack.BannerPlugin( - '/** \n' + + new webpack.BannerPlugin({ + banner: '/** \n' + ' *\t '+pkg.name+' v'+pkg.version+' by '+pkg.author.name+'\n' + ' *\t build date: '+ new Date().toISOString() +' \n' + ' *\t MIT License \n' + ' */ \n', - { raw: true } - ) + raw: true + }) ] }, dev: { devtool: 'source-map', - debug: true, plugins: [ + new webpack.LoaderOptionsPlugin({ + debug: true + }), new webpack.optimize.DedupePlugin(), new StringReplacePlugin() ] diff --git a/webpack.test.config.js b/webpack.test.config.js index af4b5dbc..c5752c07 100644 --- a/webpack.test.config.js +++ b/webpack.test.config.js @@ -10,22 +10,31 @@ module.exports = { entry: webpackConfig.entry, output: webpackConfig.output, resolve: webpackConfig.resolve, - isparta: { - embedSource: true, - noAutoWrap: true, - babel: { - compact: false, - presets: ['es2015'], - plugins: [['transform-es2015-classes', {loose: true}]] - } - }, + // isparta: { + // embedSource: true, + // noAutoWrap: true, + // babel: { + // compact: false, + // presets: ['es2015'], + // plugins: [['transform-es2015-classes', {loose: true}]] + // } + // }, module: { - loaders: [ + rules: [ { test: /\.js$/, include: path.join(__dirname, 'src'), exclude: /tablefilter\/node_modules/, - loader: 'isparta' + loader: 'isparta-loader', + options: { + embedSource: true, + noAutoWrap: true, + babel: { + compact: false, + presets: ['es2015'], + plugins: [['transform-es2015-classes', {loose: true}]] + } + } }, { test: path.join(__dirname, 'src'), @@ -46,6 +55,8 @@ module.exports = { ] }, devtool: 'sourcemap', - debug: true, - plugins: [new Clean(['dist'])].concat(webpackConfig.dev.plugins) + plugins: [ + new Clean(['dist']), + + ].concat(webpackConfig.dev.plugins) };