Create 'static' directory for serving from flask
This commit is contained in:
parent
92050e27ea
commit
c0fab723dc
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"hash": true,
|
||||
"title": "tlater.net",
|
||||
"filename": "./index.html",
|
||||
"filename": "../index.html",
|
||||
"template": "./src/index/index.pug",
|
||||
"chunks": ["index"]
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"hash": true,
|
||||
"title": "tlater.net contact",
|
||||
"filename": "./mail.html",
|
||||
"filename": "../mail.html",
|
||||
"template": "./src/mail/mail.pug",
|
||||
"chunks": ["mail"]
|
||||
}
|
||||
|
|
|
@ -18,11 +18,12 @@ const pages = page_files.map(page => JSON.parse(fs.readFileSync(
|
|||
module.exports = {
|
||||
entry: {
|
||||
index: "./src/index/index.js",
|
||||
mail: "./src/mail/mail.js"
|
||||
mail: "./src/mail/mail.js",
|
||||
startpage: "./src/startpage/startpage.js"
|
||||
},
|
||||
output: {
|
||||
filename: "[name].bundle.js",
|
||||
path: path.resolve(__dirname, "dist")
|
||||
path: path.resolve(__dirname, "dist", "static")
|
||||
},
|
||||
plugins: [
|
||||
new CleanWebpackPlugin("dist"),
|
||||
|
@ -47,7 +48,12 @@ module.exports = {
|
|||
{
|
||||
test: /.scss$/,
|
||||
use: [{
|
||||
loader: MiniCssExtractPlugin.loader
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
output: {
|
||||
path: path.resolve(__dirname, "dist", "static")
|
||||
}
|
||||
}
|
||||
}, {
|
||||
loader: "css-loader"
|
||||
}, {
|
||||
|
@ -77,7 +83,10 @@ module.exports = {
|
|||
{
|
||||
test: /\.(eot|svg|ttf|woff|woff2)$/,
|
||||
use: [{
|
||||
loader: "file-loader"
|
||||
loader: "file-loader",
|
||||
options: {
|
||||
outputPath: "static"
|
||||
}
|
||||
}]
|
||||
}
|
||||
]
|
||||
|
|
Reference in a new issue