加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
webpack.dev.config.js 1.41 KB
一键复制 编辑 原始数据 按行查看 历史
华哲辰 提交于 2020-04-03 00:14 . fix publicPath
const path = require("path");
module.exports = () => ({
entry: {
index: "./src/index.ts"
},
output: {
path: path.resolve(__dirname, "./dist"),
publicPath: "/dist/",
filename: "[name].js",
globalObject: "this"
},
module: {
rules: [
{
test: /\.s(c|a)ss$/,
use: [
"vue-style-loader",
"css-loader",
{
loader: "sass-loader",
options: {
implementation: require("sass"),
fiber: require("fibers")
},
options: {
implementation: require("sass"),
sassOptions: {
fiber: require("fibers")
}
}
}
]
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"]
},
{
test: /\.tsx?$/,
loader: "ts-loader"
},
{
test: /\.(html|svg)?$/,
loader: "text-loader"
},
{
test: /.(png|woff(2)?|eot|ttf)(\?[a-z0-9=\.]+)?$/,
loader: "url-loader"
}
]
},
resolve: {
alias: {
vue$: "vue/dist/vue.esm.js"
},
extensions: ["*", ".js", ".ts", ".json"]
},
devServer: {
historyApiFallback: true,
noInfo: true,
overlay: true,
disableHostCheck: true,
index: "dev.html"
},
performance: {
hints: false
},
plugins: [],
devtool: "#cheap-module-eval-source-map"
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化