How to use the slash function from loader-utils

Find comprehensive JavaScript loader-utils.slash code examples handpicked from public code repositorys.

147
148
149
150
151
152
153
154
155
156
compilation.resolvers.context.resolve({}, dirContext, spriteDir, (err, dir) => {
  if (!err) {
    const context = this.options.context
    const spriteName = Path.basename(spriteDir)
    const relativeDir = Path.relative(context, dir)
    const pattern = utils.slash(relativeDir + request.slice(spriteDir.length))
    done(null, pattern, spriteName)
    return
  }
  done(err)
fork icon0
star icon0
watch icon2

+ 5 other calls in file