[Pkg-javascript-commits] [node-es6-promise] 01/03: Update webpack and babel configs (Thanks to Paolo Greppi)
Sruthi Chandran
srud-guest at moszumanska.debian.org
Fri Dec 29 19:25:39 UTC 2017
This is an automated email from the git hooks/post-receive script.
srud-guest pushed a commit to branch babel
in repository node-es6-promise.
commit 9787a946acb3b50c0c4e52defb9122453ff37c60
Author: Sruthi Chandran <srud at disroot.org>
Date: Sat Dec 30 00:33:39 2017 +0530
Update webpack and babel configs (Thanks to Paolo Greppi)
---
debian/patches/use-babel.patch | 12 ++++++++----
debian/rules | 3 +--
debian/webpack.config.js | 16 +++++++---------
3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/debian/patches/use-babel.patch b/debian/patches/use-babel.patch
index 2cb01ba..82ec476 100644
--- a/debian/patches/use-babel.patch
+++ b/debian/patches/use-babel.patch
@@ -1,10 +1,14 @@
--- /dev/null
+++ b/.babelrc
-@@ -0,0 +1,7 @@
+@@ -0,0 +1,11 @@
+{
+ "presets": [
-+ ["es2015", {
-+ "loose": false,
-+ }],
++ "es2015",
+ ],
++ "plugins": [
++ "babel-plugin-add-module-exports"
++ ],
++ "ignore": [
++ "dist/*.js"
++ ]
+}
diff --git a/debian/rules b/debian/rules
index b3e59be..3453031 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,8 +7,7 @@
dh $@
override_dh_auto_build:
- babeljs lib -d dist
- webpack --config debian/webpack.config.js lib/es6-promise.js dist/es6-promise.js --target=web --output-library=es6-promise --output-library-target=umd --module-bind 'js=babel-loader'
+ webpack --config debian/webpack.config.js lib/es6-promise.js dist/es6-promise.js
uglifyjs dist/es6-promise.js > dist/es6-promise.min.js
override_dh_auto_clean:
diff --git a/debian/webpack.config.js b/debian/webpack.config.js
index 1f62b0e..fe43ff3 100644
--- a/debian/webpack.config.js
+++ b/debian/webpack.config.js
@@ -1,18 +1,16 @@
'use strict';
-
-var fs = require('fs');
var path = require('path');
-var webpack = require('webpack');
-
var config = {
-
+ target: 'web',
resolve: {
- modules: ['/usr/lib/nodejs'],
+ modules: ['/usr/lib/nodejs', '.'],
},
-
resolveLoader: {
modules: ['/usr/lib/nodejs'],
- }
+ },
+ output: {
+ libraryTarget: 'umd'
+ },
+ module: { rules: [ { use: [ 'babel-loader' ] } ] }
}
-
module.exports = config;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-es6-promise.git
More information about the Pkg-javascript-commits
mailing list