Sunshine168 / resume

My resume
3 stars 1 forks source link

奇怪锦囊 #13

Open Sunshine168 opened 6 years ago

Sunshine168 commented 6 years ago

jsxstyle

webpack config

work with ExtractTextPlugin ,fallback option is required, otherwise may break with code split —— loss some css style

        {
          use: ExtractTextPlugin.extract({
            fallback: {
              loader: 'style-loader',
              options: {
                hmr: false
              }
            },
            use: [
              {
                loader: 'css-loader',
                options: {
                  importLoaders: 1,
                  minimize: true,
                  sourceMap: true
                }
              },
              {
                loader: 'postcss-loader',
                options: {
                  sourceMap: true
                }
              }
            ]
          }),
          test: /\.css$/
        },

did not pass jsxstyle element as the tag otherwise may break in prod ReferenceError