Verified Commit 91a1c74a authored by Connor Shea's avatar Connor Shea 🏄

Parse the CSS via webpack.

parent 963b7c29
Pipeline #26345893 passed with stage
in 1 minute and 7 seconds
......@@ -2,6 +2,7 @@
"dependencies": {
"css-loader": "^1.0.0",
"mini-css-extract-plugin": "^0.4.1",
"node-sass": "^4.9.2",
"sass-loader": "^7.0.3",
"vue": "^2.5.16",
"vue-loader": "^15.2.6",
......
const path = require('path');
const devMode = process.env.NODE_ENV !== 'production';
const webpack = require('webpack');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
module.exports = {
mode: devMode ? 'development' : 'production',
entry: './src/main.js',
entry: [ path.resolve(__dirname, 'src/main.js'), path.resolve(__dirname, 'src/main.scss') ],
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js'
},
plugins: [
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "bundle.css"
})
],
devtool: "source-map",
module: {
rules: [
{
test: /\.(sa|sc|c)ss$/,
test: /\.scss$/,
use: [
devMode ? 'style-loader' : MiniCssExtractPlugin.loader,
'css-loader',
'sass-loader',
{ loader: MiniCssExtractPlugin.loader },
{ loader: 'css-loader', options: { sourceMap: true } },
{ loader: 'sass-loader', options: { sourceMap: true } }
]
}
]
},
plugins: [
new MiniCssExtractPlugin({
// Options similar to the same options in webpackOptions.output
// both options are optional
filename: "bundle.css"
})
]
}
};
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment