代码拉取完成,页面将自动刷新
同步操作将从 zaaack/svg-measure 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
const webpack = require('webpack')
const Clean = require('clean-webpack-plugin')
// const cssModules = require('./tools/webpack-blocks/css-loader')
const path = require('path')
const IS_DEV = process.env.NODE_ENV === 'development'
const DIST = `${__dirname}/static/dist/`
module.exports = {
mode: process.env.NODE_ENV,
entry: {
bundle: "./src/index.js",
},
output: {
filename: "[name].js",
path: DIST,
publicPath: '/svg-measure/static/dist/',
},
// Enable sourcemaps for debugging webpack's output.
devtool: "source-map",
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: [".ts", ".tsx", ".js", ".json"],
modules: ['node_modules', 'src'],
},
devServer: {
contentBase: './',
hot: true,
proxy: {
}
},
module: {
rules: [
// All files with a '.ts' or '.tsx' extension will be handled by 'awesome-typescript-loader'.
{
test: /\.tsx?$/,
use: {
loader: "awesome-typescript-loader",
},
},
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
{
enforce: "pre",
test: /\.js$/,
use: "source-map-loader"
},
{
test: /\.css$/,
use: [
'style-loader',
'css-loader'
]
},
{
test: /test\/fixtures\/.*\.svg$/,
use: [ 'raw-loader' ],
},
{
test: /\.(png|svg|jpg|gif|woff|woff2|eot|ttf|otf)$/,
exclude: /test\/fixtures\//,
use: [
{
loader: 'url-loader',
options: {
limit: 8192
}
}
],
},
]
},
plugins: [
!IS_DEV && new Clean(["dist"], {exclude: ['vendor.js', 'vendor-manifest.json']}),
IS_DEV && new webpack.NamedModulesPlugin(),
IS_DEV && new webpack.HotModuleReplacementPlugin(),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV),
'__DEV__': JSON.stringify(IS_DEV ? true : false),
}),
new webpack.DllReferencePlugin({
context: __dirname,
manifest: require(`${DIST}/vendor-manifest.json`),
}),
].filter(Boolean)
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。