Add todos, move config

This commit is contained in:
Ramon Wenger 2021-01-26 14:26:28 +01:00
parent d7f3a89ea1
commit 6108430389
2 changed files with 19 additions and 14 deletions

View File

@ -7,16 +7,12 @@ const sourceMapEnabled = isProduction
: config.dev.cssSourceMap : config.dev.cssSourceMap
module.exports = { module.exports = {
loaders: utils.cssLoaders({ // loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled, // sourceMap: sourceMapEnabled,
extract: isProduction // todo: need that?
}), // extract: isProduction
cssSourceMap: sourceMapEnabled, // }),
cacheBusting: config.dev.cacheBusting, // cssSourceMap: sourceMapEnabled,
transformToRequire: { // cacheBusting: config.dev.cacheBusting,
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
} }

View File

@ -6,7 +6,7 @@ const vueLoaderConfig = require('./vue-loader.conf')
const VueLoaderPlugin = require('vue-loader/lib/plugin') const VueLoaderPlugin = require('vue-loader/lib/plugin')
function resolve (dir) { function resolve(dir) {
return path.join(__dirname, '..', dir) return path.join(__dirname, '..', dir)
} }
@ -21,6 +21,8 @@ const createLintingRule = () => ({
} }
}) })
//todo on monday: mini-css-extract-plugin?
//https://github.com/webpack-contrib/mini-css-extract-plugin
//todo: do we need postcss? //todo: do we need postcss?
module.exports = { module.exports = {
context: path.resolve(__dirname, '../'), context: path.resolve(__dirname, '../'),
@ -47,7 +49,14 @@ module.exports = {
{ {
test: /\.vue$/, test: /\.vue$/,
loader: 'vue-loader', loader: 'vue-loader',
options: vueLoaderConfig options: {
transformAssetUrls: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}
}, },
{ {
test: /\.js$/, test: /\.js$/,