Commit 5030f7d4 authored by Élodie Thiéblin's avatar Élodie Thiéblin
Browse files

[webpack] Extra commas and cors

parent f81d8bf3755d
Pipeline #17312 passed with stages
in 2 minutes and 48 seconds
......@@ -13,35 +13,35 @@ module.exports = [
talk: "./src/talk/talk.ts",
blogpost: "./src/blogpost/blogpost.tsx",
blog: "./src/blogpost/blog.tsx",
dcelement: "./src/dublincore/dublincore.tsx"
dcelement: "./src/dublincore/dublincore.tsx",
},
mode: isProd ? "production" : "development",
output: {
path: path.join(__dirname, "build/"),
publicPath: path.join(__dirname, "build/"),
filename: "view_[name].js"
filename: "view_[name].js",
},
devtool: "source-map",
resolve: {
extensions: [".ts", ".tsx", ".js", ".json", ".vue"]
extensions: [".ts", ".tsx", ".js", ".json", ".vue"],
},
node: {
fs: "empty"
fs: "empty",
},
module: {
rules: [
{ test: /\.vue$/, loader: "vue-loader" },
{
test: /\.css$/,
use: ["vue-style-loader", "css-loader"]
use: ["vue-style-loader", "css-loader"],
},
{
test: /\.tsx?$/,
loader: "ts-loader",
options: { appendTsSuffixTo: [/\.vue$/] }
options: { appendTsSuffixTo: [/\.vue$/] },
},
{ enforce: "pre", test: /\.js$/, loader: "source-map-loader" }
]
{ enforce: "pre", test: /\.js$/, loader: "source-map-loader" },
],
},
plugins: [
new CopyWebpackPlugin(
......@@ -49,19 +49,26 @@ module.exports = [
{ from: "src/index.vd.json", to: "index.vd.json" },
{
from: "node_modules/@logilab/libview/build/index.html",
to: "index.html"
}
to: "index.html",
},
],
{}
),
new VueLoaderPlugin()
new VueLoaderPlugin(),
],
devServer: {
contentBase: path.join(__dirname, "build"),
compress: true,
historyApiFallback: {
index: "index.html"
}
}
}
index: "index.html",
},
headers: {
"Access-Control-Allow-Origin": "*",
"Access-Control-Allow-Methods":
"GET, POST, PUT, DELETE, PATCH, OPTIONS",
"Access-Control-Allow-Headers":
"X-Requested-With, content-type, Authorization",
},
},
},
];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment