mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-27 03:21:01 +00:00
64f81bc316
Signed-off-by: Thomas Citharel <tcit@tcit.fr> use scss Signed-off-by: Thomas Citharel <tcit@tcit.fr> fix build, add babel, fix annotations fixes (and improvements !) for baggy add live reload & environments & eslint & theme fixes
62 lines
1.3 KiB
JavaScript
62 lines
1.3 KiB
JavaScript
const webpackMerge = require('webpack-merge');
|
|
const webpack = require('webpack');
|
|
const path = require('path');
|
|
const commonConfig = require('./common.js');
|
|
|
|
module.exports = function () {
|
|
return webpackMerge(commonConfig(), {
|
|
devtool: 'eval-source-map',
|
|
output: {
|
|
filename: '[name].dev.js'
|
|
},
|
|
|
|
devServer: {
|
|
hot: true,
|
|
// enable HMR on the server
|
|
|
|
contentBase: './web',
|
|
// match the output path
|
|
},
|
|
plugins: [
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
],
|
|
module: {
|
|
rules: [
|
|
{
|
|
enforce: 'pre',
|
|
test: /\.js$/,
|
|
loader: 'eslint-loader',
|
|
exclude: /node_modules/,
|
|
},
|
|
{
|
|
test: /\.js$/,
|
|
exclude: /(node_modules)/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['env']
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.(s)?css$/,
|
|
use: [
|
|
'style-loader',
|
|
{
|
|
loader: 'css-loader',
|
|
options: {
|
|
importLoaders: 1,
|
|
}
|
|
},
|
|
'postcss-loader',
|
|
'sass-loader'
|
|
]
|
|
},
|
|
{
|
|
test: /\.(jpg|png|gif|svg|eot|ttf|woff|woff2)$/,
|
|
use: 'url-loader'
|
|
},
|
|
]
|
|
},
|
|
})
|
|
};
|