aboutsummaryrefslogtreecommitdiff
path: root/build/webpack.base.conf.js
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-07-28 13:30:29 +0300
committerHenry Jameson <me@hjkos.com>2019-07-28 13:30:29 +0300
commitb3aff9bbae77b2fd34b2267ce9196c0ebd3e4691 (patch)
tree1219e00b6bfe6784add1578a3bc986c1dbb5f34d /build/webpack.base.conf.js
parent7f6f025792dcb3a10c94c8952d0312abd0b46989 (diff)
parent4827e4d972f8ee11e606693e24ae4ca21711c6b1 (diff)
Merge remote-tracking branch 'upstream/develop' into emoji-selector-update
* upstream/develop: (469 commits) Feature/add sticker picker guard more secure routes guard secure routes by redirecting to root closest can returns itself as well find inside status-content div only try to use the closest a tag as target Update es.json Also apply keyword filter to subjects Remove files I accidentally pushed in fix issues caused by merges in usersearch on @ Add user search at fix eslint warnings remove vue-popperjs fix moderation menu partially hidden by usercard boundary migrate popper css rewrite ModerationTools using v-tooltip make popover position for status action dropdow relative to parent node rewrite ExtraButtons using v-tooltip install v-tooltip i18n/Update pedantic Japanese translation ...
Diffstat (limited to 'build/webpack.base.conf.js')
-rw-r--r--build/webpack.base.conf.js81
1 files changed, 37 insertions, 44 deletions
diff --git a/build/webpack.base.conf.js b/build/webpack.base.conf.js
index e07bb7a2..f8968966 100644
--- a/build/webpack.base.conf.js
+++ b/build/webpack.base.conf.js
@@ -20,9 +20,16 @@ module.exports = {
publicPath: process.env.NODE_ENV === 'production' ? config.build.assetsPublicPath : config.dev.assetsPublicPath,
filename: '[name].js'
},
+ optimization: {
+ splitChunks: {
+ chunks: 'all'
+ }
+ },
resolve: {
- extensions: ['', '.js', '.vue'],
- fallback: [path.join(__dirname, '../node_modules')],
+ extensions: ['.js', '.vue'],
+ modules: [
+ path.join(__dirname, '../node_modules')
+ ],
alias: {
'vue$': 'vue/dist/vue.runtime.common',
'src': path.resolve(__dirname, '../src'),
@@ -30,67 +37,53 @@ module.exports = {
'components': path.resolve(__dirname, '../src/components')
}
},
- resolveLoader: {
- fallback: [path.join(__dirname, '../node_modules')]
- },
module: {
noParse: /node_modules\/localforage\/dist\/localforage.js/,
- preLoaders: [
+ rules: [
{
- test: /\.vue$/,
- loader: 'eslint',
+ enforce: 'pre',
+ test: /\.(js|vue)$/,
include: projectRoot,
- exclude: /node_modules/
+ exclude: /node_modules/,
+ use: {
+ loader: 'eslint-loader',
+ options: {
+ formatter: require('eslint-friendly-formatter'),
+ sourceMap: config.build.productionSourceMap,
+ extract: true
+ }
+ }
},
{
- test: /\.js$/,
- loader: 'eslint',
- include: projectRoot,
- exclude: /node_modules/
- }
- ],
- loaders: [
- {
test: /\.vue$/,
- loader: 'vue'
+ use: 'vue-loader'
},
{
test: /\.jsx?$/,
- loader: 'babel',
include: projectRoot,
- exclude: /node_modules\/(?!tributejs)/
- },
- {
- test: /\.json$/,
- loader: 'json'
+ exclude: /node_modules\/(?!tributejs)/,
+ use: 'babel-loader'
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
- loader: 'url',
- query: {
- limit: 10000,
- name: utils.assetsPath('img/[name].[hash:7].[ext]')
+ use: {
+ loader: 'url-loader',
+ options: {
+ limit: 10000,
+ name: utils.assetsPath('img/[name].[hash:7].[ext]')
+ }
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
- loader: 'url',
- query: {
- limit: 10000,
- name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
+ use: {
+ loader: 'url-loader',
+ options: {
+ limit: 10000,
+ name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
+ }
}
- }
- ]
- },
- eslint: {
- formatter: require('eslint-friendly-formatter')
- },
- vue: {
- loaders: utils.cssLoaders({ sourceMap: useCssSourceMap }),
- postcss: [
- require('autoprefixer')({
- browsers: ['last 2 versions']
- })
+ },
]
},
plugins: [