Skip to content

Commit

Permalink
feat(webpack): runtimeCompiler config
Browse files Browse the repository at this point in the history
  • Loading branch information
hjvedvik committed Dec 10, 2018
1 parent 36e4932 commit cdb676f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gridsome/lib/app/loadConfig.js
Expand Up @@ -63,6 +63,8 @@ module.exports = (context, options = {}, pkg = {}) => {
config.maxImageWidth = localConfig.maxImageWidth || 1920
config.imageExtensions = SUPPORTED_IMAGE_TYPES

config.runtimeCompiler = localConfig.runtimeCompiler || false

config.transpileDependencies = Array.isArray(localConfig.transpileDependencies)
? localConfig.transpileDependencies.slice()
: []
Expand Down
4 changes: 4 additions & 0 deletions gridsome/lib/webpack/createBaseConfig.js
Expand Up @@ -50,6 +50,10 @@ module.exports = (app, { isProd, isServer }) => {

config.module.noParse(/^(vue|vue-router)$/)

if (app.config.runtimeCompiler) {
config.resolve.alias.set('vue$', 'vue/dist/vue.esm.js')
}

if (!isProd) {
config.devtool('cheap-module-eval-source-map')
}
Expand Down

0 comments on commit cdb676f

Please sign in to comment.