Skip to content

Instantly share code, notes, and snippets.

@Nyrox
Created October 16, 2018 14:11
Show Gist options
  • Save Nyrox/072119a7bddd38a4bdd36c292d212294 to your computer and use it in GitHub Desktop.
Save Nyrox/072119a7bddd38a4bdd36c292d212294 to your computer and use it in GitHub Desktop.
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