mirror of
https://github.com/seigler/dash-visualizer
synced 2025-07-26 01:06:12 +00:00
56 lines
1.3 KiB
JavaScript
56 lines
1.3 KiB
JavaScript
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
|
const path = require('path');
|
|
const autoprefixer = require('autoprefixer');
|
|
|
|
module.exports = {
|
|
entry: './src/app.js',
|
|
resolve: {
|
|
modules: [
|
|
path.resolve(__dirname, 'src'),
|
|
"node_modules"
|
|
]
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: 'bundle.js'
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.less$/,
|
|
use: ExtractTextPlugin.extract({
|
|
fallback: 'style-loader',
|
|
use: [
|
|
'css-loader',
|
|
{
|
|
loader: 'postcss-loader',
|
|
options: {
|
|
plugins: function () {
|
|
return [autoprefixer('last 3 versions')];
|
|
}
|
|
}
|
|
},
|
|
{
|
|
loader: 'less-loader',
|
|
options: {
|
|
paths: [
|
|
path.resolve(__dirname, 'src'),
|
|
],
|
|
plugins: [
|
|
require('less-plugin-glob')
|
|
]
|
|
}
|
|
}
|
|
]
|
|
})
|
|
},
|
|
{
|
|
test: /\.(jpe?g|gif|png|svg)$/,
|
|
loader: 'file-loader?emitFile=false&name=[path][name].[ext]'
|
|
}
|
|
]
|
|
},
|
|
plugins: [
|
|
new ExtractTextPlugin('style.css')
|
|
]
|
|
};
|