Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add prettify option #1461

Merged
merged 3 commits into from
Jan 4, 2019
Merged

feat: add prettify option #1461

merged 3 commits into from
Jan 4, 2019

Conversation

sodatea
Copy link
Member

@sodatea sodatea commented Jan 4, 2019

closes #1426

@sodatea sodatea 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.

@sodatea
Copy link
Member Author

sodatea commented Apr 8, 2019

@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