-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
49 lines (45 loc) · 1.29 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
47
48
49
// Good tutorials on webpack:
// https://medium.com/@kasulejoseph/how-to-create-a-vue-js-application-from-scratch-with-webpack-and-babel-c1629d411127
// https://www.neoguias.com/tutorial-webpack/#Que_es_Webpack
const path = require("path");
const { VueLoaderPlugin } = require("vue-loader");
module.exports = {
// The application entry point
entry: "./client/src/main.js",
module: {
rules: [
{
test: /\.vue$/,
use: "vue-loader"
},
//use babel-loader to transpile js files
{
test: /\.js$/,
exclude: /node_modules/,
loader: "babel-loader"
// use: ['babel-loader'],
},
// css-loader to bundle all the css files into one file and vue-style-loader
// to add all the styles inside the <style> block in `.vue` file.
// {
// test: /\.css$/,
// use: ["vue-style-loader", "css-loader"]
// }
]
},
// Where to compile the bundle
// By default the output directory is `dist`
output: {
path: path.join(__dirname, "./src/dist"),
filename: "bundle.js"
},
// devServer: {
// contentBase: path.join(__dirname, "../public"),
// port: 3000,
// publicPath: "/dist/"
// },
plugins: [
// make sure to include the plugin for the magic
new VueLoaderPlugin()
]
};