forked from ml5js/ml5-library
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.common.babel.js
More file actions
41 lines (37 loc) · 811 Bytes
/
webpack.common.babel.js
File metadata and controls
41 lines (37 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// Copyright (c) 2018 ml5
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
import { join, resolve } from 'path';
const include = join(__dirname, 'src');
export const indexEntryWithBabel = ['babel-polyfill', './src/index.js'];
export const developmentPort = 8080;
export default {
name: 'ml5',
entry: indexEntryWithBabel,
output: {
path: resolve(__dirname, 'dist'),
publicPath: '/',
libraryTarget: 'umd',
filename: 'ml5.js',
library: 'ml5',
},
module: {
rules: [
{
enforce: 'pre',
test: /\.js$/,
exclude: /node_modules/,
loader: 'eslint-loader',
},
{
test: /\.js$/,
loader: 'babel-loader',
include,
},
],
},
node: {
fs: "empty"
},
};