English 中文(简体)
• 如何在3个编组中为主编添加内容安全政策
原标题:how to add content security policy (csp) for primevue in vue 3 composition api

当我对我的假肢项目 c时,它将由于主星产生的风格标签而打破垃圾。

“refer

i 已经在垃圾中添加散射,但不知道如何在这种由金星生成的汽车中添加散射。

最佳回答

经过几天的艰苦努力,我设法将垃圾排在2个包裹以下。

n 安装

n 安装

i 改称:

const webpack = require( webpack );
const path = require( path );
const crypto = require( crypto );
const emotionalNonce = crypto.randomBytes(16).toString( base64 );
const emotionalNonce1 = crypto.randomBytes(16).toString( base64 );
const MiniCssExtractPlugin = require( mini-css-extract-plugin );
const CspHtmlWebpackPlugin = require( csp-html-webpack-plugin );
module.exports = {
  publicPath: process.env.VUE_APP_BASE_URL,
  configureWebpack: {
    devServer: {
      hot: false
  },
    devtool:  source-map ,
    plugins: [
      new webpack.DefinePlugin({
         process.env.EMOTIONAL_NONCE : JSON.stringify(emotionalNonce),
      }),
      new MiniCssExtractPlugin({
          filename: path.resolve(__dirname,  ../dist/css/[name].[hash:8].css ),
          chunkFilename: "[name].[hash:8].css",
          attributes: {
            nonce: emotionalNonce,
          }
      }),
          new CspHtmlWebpackPlugin({
             base-uri : " self ",
             object-src : " none ",
             script-src : [" self ",` nonce-${emotionalNonce1} `],
             style-src : [ " self ","fonts.googleapis.com",` nonce-${emotionalNonce} `]
          }, {
            enabled: true,
            hashingMethod:  sha256 ,
            hashEnabled: {
               script-src : true,
               style-src : true
            },
            nonceEnabled: {
               script-src : true,
               style-src : true
            },
          })
  ],
  module: {
      rules: [
        {
          test: /.s(c|a)ss$/,
          use: [
              MiniCssExtractPlugin.loader,
              {
                  loader:  css-loader ,
                  options: {
                      sourceMap: true,
                  }
              },
              {
                loader:  sass-loader ,
                options: {
                   implementation: require( sass ),
                   sassOptions: {
                      indentedSyntax: false // optional
                   }
                }
             }
          ]
      }
    ]
  }

  },
};
问题回答

暂无回答




相关问题
how to route with meta data in vue route

I am using vue-router to route my app.I want to route with some meta data.I have this in my index.js for route config. { path: /column/:id , name: columnDetail , meta: { ...

Vue3 webcam typescript support

i m looking for component webcam for my vue3 project, currently i found https://www.npmjs.com/package/vue-camera-lib this package, but the problem is this package don t support typescript, i got this ...

Problem with publishing tools is laravel nova

Laravel 10, nova 4.25.1. I have a problem with publishing tools. I create according to the documentation. I register in the provider, specify in fields, run npm run dev, prod, watch. Nothing helps and ...

Vue3 Cleave js not working if not using v-model.lazy

Currently i try to use cleavejs to formatting thousand separator my input number, it s show strange behavior when i input 1000.123 it show 1,000.12 which is correct format, but my v-model value is ...

热门标签