forked from vuejs/vue-loader
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathserver.js
More file actions
34 lines (32 loc) · 658 Bytes
/
server.js
File metadata and controls
34 lines (32 loc) · 658 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
const path = require('path')
const webpack = require('webpack')
const webpackConfig = {
context: path.resolve(__dirname, 'dev'),
entry: {
// 'build-react': './react.jsx',
'build-vue': './vue.md'
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dev/dist')
},
module: {
rules: [{
test: /\.(vue|md)$/,
loader: 'index',
options: {
output: '',
vue: './index.js'
}
}]
},
resolveLoader: {
modules: [__dirname, 'node_modules']
}
}
webpack(webpackConfig, (err, stats) => {
if (err || stats.hasErrors()) {
// Handle errors here
}
// Done processing
})