Created
October 16, 2018 14:11
-
-
Save Nyrox/072119a7bddd38a4bdd36c292d212294 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const path = require('path'); | |
const MiniCssExtractPlugin = require("mini-css-extract-plugin"); | |
const main = { | |
entry: ['./source/main.js', './assets/styles/main.scss'], | |
output: { | |
filename: "main.js", | |
path: path.resolve(__dirname, "dist") | |
}, | |
resolve: { | |
alias: { | |
'vue$': 'vue/dist/vue.esm.js' | |
}, | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.js$/, | |
exclude: /node_modules/, | |
use: { | |
loader: "babel-loader" | |
} | |
}, | |
{ | |
test: /\.(sass|scss)$/, | |
use: [ | |
{ | |
loader: MiniCssExtractPlugin.loader | |
}, | |
"css-loader", | |
{ | |
loader: "postcss-loader" | |
}, | |
"sass-loader", | |
] | |
}, | |
{ | |
test: /\.vue$/, | |
loader: 'vue-loader' | |
} | |
] | |
}, | |
plugins: [ | |
new MiniCssExtractPlugin({ | |
filename: "[name].css", | |
}), | |
], | |
watch: true | |
}; | |
module.exports = [main]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment