Skip to content

Commit

Permalink
Use babel in the build process.
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Aug 22, 2018
1 parent 95c1e62 commit 6a667fd
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
67 changes: 67 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
"hammerjs": "^2.0.8"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-loader": "^7.1.5",
"babel-preset-env": "^1.7.0",
"body-parser": "^1.15.0",
"bootstrap": "^3.3.6",
"bootswatch": "^3.3.6",
Expand Down
22 changes: 22 additions & 0 deletions webpack.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,28 @@ module.exports = {
*/
module: {
rules: [{
test: /\.js$/,
include: [
path.resolve(__dirname, 'src'),
path.resolve(__dirname, 'tests'),
path.resolve(__dirname, 'examples'),
path.resolve(__dirname, 'tutorials')
],
use: [{
loader: 'babel-loader',
options: {
presets: [[
'env', {
targets: {
node: true,
browsers: ['defaults'],
uglify: true
}
}
]]
}
}]
}, {
test: /\.styl$/,
use: [
'style-loader',
Expand Down

0 comments on commit 6a667fd

Please sign in to comment.