forked from linkesch/medium-editor-insert-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwebpack.config.js
46 lines (44 loc) · 1.13 KB
/
webpack.config.js
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
42
43
44
45
46
var webpack = require('webpack')
var path = require('path')
var rootPath = path.resolve(__dirname, './src'),
jsRoot = path.join(rootPath, 'js'),
sassRoot = path.join(rootPath, 'sass'),
templateRoot = path.join(rootPath, 'templates'),
outputPath = path.resolve(__dirname, './dist')
module.exports = {
entry: {
'medium-editor-insert-plugin': './src/js/medium-editor-insert-plugin.js',
},
output: {
path: outputPath,
filename: '[name].js',
libraryTarget: 'umd',
library: 'MediumEditorInsertPlugin'
},
resolve: {
extensions: ['', '.js', '.hbs', '.scss'],
root: rootPath,
modulesDirectories: [
'node_modules',
rootPath,
jsRoot,
templateRoot
]
},
module: {
loaders: [
{
test: /.js$/,
loader: 'babel?stage=0'
},
{
test: /.hbs$/,
loader: 'handlebars'
},
{
test: /.scss$/,
loaders: ['style', 'css', 'sass']
}
]
}
}