uweather_firmware/frontend/webpack.config.js

46 lines
863 B
JavaScript
Raw Permalink Normal View History

const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
module.exports = {
entry: {
main: './src/index.js',
setup: './src/setup.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'js/[name].js'
},
module: {
2020-07-07 18:37:12 -07:00
rules: [
{
test:/\.js$/,
exclude: /\/node_modules\//,
use: {
loader: 'babel-loader'
}
},
{
test: /\.s[ac]ss$/,
use: [
MiniCssExtractPlugin.loader,
{
loader: 'css-loader'
},
{
loader: 'sass-loader',
options: {
sourceMap: true,
// options...
}
}
]
}]
},
plugins: [
new MiniCssExtractPlugin({
filename: 'css/[name].bundle.css'
}),
]
};