How to use @dcloudio/vue-cli-plugin-uni - 2 common examples

To help you get started, we’ve selected a few @dcloudio/vue-cli-plugin-uni examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dcloudio / uni-app / packages / uni-cli-shared / lib / json.js View on Github external
function parseJson (content, preprocess = false) {
  if (typeof content === 'string') {
    if (preprocess) {
      const preprocessor = require('@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/preprocess')
      const {
        jsPreprocessOptions
      } = require('./platform')
      content = preprocessor.preprocess(content, jsPreprocessOptions.context, {
        type: jsPreprocessOptions.type
      })
    }
    content = JSON.parse(stripJsonComments(content))
  }

  content = JSON.stringify(content)
    .replace(/\u2028/g, '\\u2028')
    .replace(/\u2029/g, '\\u2029')

  return JSON.parse(content)
}
github dcloudio / uni-app / packages / vue-cli-plugin-uni / packages / webpack-uni-app-loader / view / script.js View on Github external
module.exports = function(content, map) {
  this.cacheable && this.cacheable()

  content = preprocessor.preprocess(content, jsPreprocessOptions.context, {
    type: jsPreprocessOptions.type
  })

  return genCode(parseComponents(content, traverse))
}

@dcloudio/vue-cli-plugin-uni

uni-app plugin for vue-cli 3

Apache-2.0
Latest version published 2 months ago

Package Health Score

81 / 100
Full package analysis

Similar packages