mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
Adds Webpack support and removes the use for Grunt
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
This commit is contained in:
parent
3b4502e0e6
commit
64f81bc316
197 changed files with 8710 additions and 131004 deletions
62
app/config/webpack/dev.js
Normal file
62
app/config/webpack/dev.js
Normal file
|
@ -0,0 +1,62 @@
|
|||
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'
|
||||
},
|
||||
]
|
||||
},
|
||||
})
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue