mirror of
https://github.com/seigler/dash-visualizer
synced 2025-07-27 01:36:10 +00:00
📺 refactor to add webpack
This commit is contained in:
parent
561e3f3a76
commit
9cd22b19b2
10 changed files with 3963 additions and 191 deletions
56
webpack.config.js
Normal file
56
webpack.config.js
Normal file
|
@ -0,0 +1,56 @@
|
|||
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')
|
||||
]
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue