diff options
| author | Ben Beltran <ben@nsovocal.com> | 2017-08-30 00:29:19 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2017-08-30 00:29:19 -0500 |
| commit | b78f678de4f242b2a364bbf0cc39c8ec61ee5357 (patch) | |
| tree | 92cb79b266ec9b5b609a8e8ba829bda3d7315ca8 /config | |
| parent | dc7f608a828fc0b34a291af915727ab1f7d6ba0a (diff) | |
| parent | 21f11b5ae525f52fd1a2bf1a741ad79bfccb1278 (diff) | |
Diffstat (limited to 'config')
| -rw-r--r-- | config/.eslintrc | 5 | ||||
| -rw-r--r-- | config/webpack.js | 41 |
2 files changed, 46 insertions, 0 deletions
diff --git a/config/.eslintrc b/config/.eslintrc new file mode 100644 index 0000000..74e0826 --- /dev/null +++ b/config/.eslintrc @@ -0,0 +1,5 @@ +{ + "parserOptions": { + "sourceType": "script" + } +} diff --git a/config/webpack.js b/config/webpack.js new file mode 100644 index 0000000..98faf6d --- /dev/null +++ b/config/webpack.js @@ -0,0 +1,41 @@ +'use strict'; + +const Path = require('path'); + +module.exports = { + entry: './lib/sorting_hat', + + output: { + path: Path.resolve(__dirname, '../assets'), + filename: 'bundle.js', + publicPath: '/assets/', + library: 'SortingHat', + libraryTarget: 'umd' + }, + + module: { + loaders: [ + { + test: /\.js$/, + exclude: /doc/, + loader: 'babel-loader', + query: { + presets: ['es2017'] + } + } + ] + }, + + resolve: { + modules: [ + 'node_modules', + 'lib' + ], + + alias: { + 'vue$': 'vue/dist/vue.esm.js' + } + }, + + context: Path.resolve(__dirname, '..') +}; |