Skip to content

Conversation

haoqunjiang
Copy link
Member

closes #1426

@haoqunjiang haoqunjiang merged commit 62a9155 into vuejs:master Jan 4, 2019
alfredriesen added a commit to alfredriesen/vue-loader that referenced this pull request Jan 23, 2019
* https://github.com/vuejs/vue-loader: (23 commits)
  chore: changelog
  15.6.0
  feat: make `__file` injection opt-in in production (vuejs#1475)
  fix: template comments replace windows \ to / confirm consistent hash (vuejs#1477)
  docs(zh): updated eslint plugin link (vuejs#1471)
  chore: todo [ci skip]
  feat: support for compiler 2.6 outputSourceRange
  feat: support webpack 5 hooks (vuejs#1469)
  docs: [RU] Translation update (vuejs#1470)
  chore: changelog
  15.5.1
  fix: avoid to generate empty css chunk files (vuejs#1464)
  chore: changelog
  15.5.0
  feat: add `prettify` option (vuejs#1461)
  chore: add missing dependencies (vuejs#1336)
  fix: css modules extends error (vuejs#1452)
  docs: [RU] Translation update (vuejs#1448)
  Update eslint-plugin-vue documentation link (vuejs#1444)
  docs: remove unnecessary `path` module usage (vuejs#1430)
  ...
@S1019269
Copy link

S1019269 commented Apr 8, 2019

Can you provide an example configuration for vue-loader containing the prettify: false option? For me it is not taking effect.

@haoqunjiang
Copy link
Member Author

@S1019269

const VueLoaderPlugin = require('vue-loader/lib/plugin')

module.exports = {
  mode: 'development',
  devtool: false,
  output: {
    path: '/',
    filename: 'test.build.js'
  },
  module: {
    rules: [
      {
        test: /\.vue$/,
        loader: 'vue-loader',
        options: { prettify: false }
      },
      {
        test: /\.css$/,
        use: [
          'vue-style-loader',
          'css-loader'
        ]
      }
    ]
  },
  plugins: [
    new VueLoaderPlugin(),
    new webpack.optimize.ModuleConcatenationPlugin()
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

An option to disable prettier
3 participants