<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                合規國際互聯網加速 OSASE為企業客戶提供高速穩定SD-WAN國際加速解決方案。 廣告
                ![](https://img.kancloud.cn/bc/e1/bce18fcf619092c44a3ffa695d7d9fc5_789x415.png) webpack.common.js ~~~ const path = require('path') const HtmlWebpackPlugin = require('html-webpack-plugin') const { srcPath, distPath } = require('./paths') module.exports = { entry: path.join(srcPath, 'index'), module: { rules: [ { test: /\.js$/, loader: ['babel-loader'], include: srcPath, exclude: /node_modules/ }, // { // test: /\.vue$/, // loader: ['vue-loader'], // include: srcPath // }, // { // test: /\.css$/, // // loader 的執行順序是:從后往前(知識點) // loader: ['style-loader', 'css-loader'] // }, { test: /\.css$/, // loader 的執行順序是:從后往前 loader: ['style-loader', 'css-loader', 'postcss-loader'] // 加了 postcss }, { test: /\.less$/, // 增加 'less-loader' ,注意順序 loader: ['style-loader', 'css-loader', 'less-loader'] } ] }, plugins: [ new HtmlWebpackPlugin({ template: path.join(srcPath, 'index.html'), filename: 'index.html' }) ] } ~~~ webpack.dev.js ~~~ const path = require('path') const webpack = require('webpack') const webpackCommonConf = require('./webpack.common.js') const { smart } = require('webpack-merge') const { srcPath, distPath } = require('./paths') module.exports = smart(webpackCommonConf, { mode: 'development', module: { rules: [ // 直接引入圖片 url { test: /\.(png|jpg|jpeg|gif)$/, use: 'file-loader' } ] }, plugins: [ new webpack.DefinePlugin({ // window.ENV = 'development' ENV: JSON.stringify('development') }) ], devServer: { port: 8080, progress: true, // 顯示打包的進度條 contentBase: distPath, // 根目錄 open: true, // 自動打開瀏覽器 compress: true, // 啟動 gzip 壓縮 // 設置代理 proxy: { // 將本地 /api/xxx 代理到 localhost:3000/api/xxx '/api': 'http://localhost:3000', // 將本地 /api2/xxx 代理到 localhost:3000/xxx '/api2': { target: 'http://localhost:3000', pathRewrite: { '/api2': '' } } } } }) ~~~ webpack.prod.js ~~~ const path = require('path') const webpack = require('webpack') const { CleanWebpackPlugin } = require('clean-webpack-plugin') const webpackCommonConf = require('./webpack.common.js') const { smart } = require('webpack-merge') const { srcPath, distPath } = require('./paths') module.exports = smart(webpackCommonConf, { mode: 'production', output: { filename: 'bundle.[contentHash:8].js', // 打包代碼時,加上 hash 戳 path: distPath, // publicPath: 'http://cdn.abc.com' // 修改所有靜態文件 url 的前綴(如 cdn 域名),這里暫時用不到 }, module: { rules: [ // 圖片 - 考慮 base64 編碼的情況 { test: /\.(png|jpg|jpeg|gif)$/, use: { loader: 'url-loader', options: { // 小于 5kb 的圖片用 base64 格式產出 // 否則,依然延用 file-loader 的形式,產出 url 格式 limit: 5 * 1024, // 打包到 img 目錄下 outputPath: '/img1/', // 設置圖片的 cdn 地址(也可以統一在外面的 output 中設置,那將作用于所有靜態資源) // publicPath: 'http://cdn.abc.com' } } }, ] }, plugins: [ new CleanWebpackPlugin(), // 會默認清空 output.path 文件夾 new webpack.DefinePlugin({ // window.ENV = 'production' ENV: JSON.stringify('production') }) ] }) ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看