diff --git a/.DS_Store b/.DS_Store index 2f71506..93a9a10 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/blog/.DS_Store b/blog/.DS_Store index 7dd594a..e38d302 100644 Binary files a/blog/.DS_Store and b/blog/.DS_Store differ diff --git a/blog/todo-webpack.todo b/blog/todo-webpack.todo index 2a33548..3bb4f22 100644 --- a/blog/todo-webpack.todo +++ b/blog/todo-webpack.todo @@ -1,6 +1,7 @@ Tasks: - ☐ Move all the scss into the new theme. + ✔ Move all the scss into the new theme. @done (5/31/2020, 3:26:30 AM) ☐ Move the image shortcode into the new theme. ☐ Recreate the fonts scss file and apply it. ☐ Download and create the monospace font. + ☐ Remove any unneccessary additions from old theme (custom css, prism etc). ☐ Create a gulpfile to build the search index. diff --git a/blog/webpack-structure.md b/blog/webpack-structure.md index 655d1c3..882efe7 100644 --- a/blog/webpack-structure.md +++ b/blog/webpack-structure.md @@ -36,7 +36,7 @@ You should create the file structure for your project. TODO: Link to the webpack-filestructure note in Trilium. -We will create `./src/js` and `./src/scss` folders. We create a `./dist` folder for webpacks output and we create a `./static` folder for anything that needs to be outside the bundle. +We will create `./src/js` and `./src/scss` folders. We create a `./static/dist` folder for webpacks output. The `./static` folder can also be used for files that go outside the bundle. Inside `./src/js` we will create an `App.js`. Inside `./src` we will create a `main.js`. @@ -76,11 +76,11 @@ module.exports = { devtool: "source-map", entry: path.resolve(__dirname, "src/main.js"), output: { - path: path.resolve(__dirname, "dist"), + path: path.resolve(__dirname, "static/dist"), }, plugins: [ new CleanWebpackPlugin({ - cleanAfterEveryBuildPatterns: ["dist/*"], + cleanAfterEveryBuildPatterns: ["static/dist/*"], }), ], }; @@ -102,7 +102,7 @@ module.exports = { devtool: "source-map", entry: path.resolve(__dirname, "src/main.js"), output: { - path: path.resolve(__dirname, "dist"), + path: path.resolve(__dirname, "static/dist"), }, module: { rules: [ @@ -115,7 +115,7 @@ module.exports = { }, plugins: [ new CleanWebpackPlugin({ - cleanAfterEveryBuildPatterns: ["dist/*"], + cleanAfterEveryBuildPatterns: ["static/dist/*"], }), new AssetsPlugin({ filename: "assets.json", @@ -154,7 +154,7 @@ module.exports = merge(common, { output: { filename: "[name].[contenthash].min.js", chunkFilename: "[id].[name].[contenthash].min.js", - publicPath: "dist/", + publicPath: "/dist/", }, }); ```