diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index b33a12c..266862c 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -28,7 +28,7 @@ jobs: node-version: 14 - run: npm install - - run: npm run prod + - run: npm run build env: CI: true diff --git a/images/favicon.ico b/images/favicon.ico new file mode 100644 index 0000000..7b1548e Binary files /dev/null and b/images/favicon.ico differ diff --git a/index.html b/index.html index ae61a56..3b2efd7 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,7 @@
- + diff --git a/webpack.config.js b/webpack.config.js index cea7324..766ea71 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -32,16 +32,6 @@ var common = { // inject details of output file at end of body inject: 'body', }), - new CopyWebpackPlugin({ - patterns: [ - { - from: './images/*.*', - }, - { - from: 'favicon.ico', - }, - ], - }), ], resolve: { modules: [path.join(__dirname, 'src'), 'node_modules'], @@ -136,7 +126,11 @@ if (MODE === 'development') { }); }, }, - plugins: [], + plugins: [ + new CopyWebpackPlugin({ + patterns: [{ from: './images/*.*' }], + }), + ], }); } @@ -167,6 +161,14 @@ if (MODE === 'production') { verbose: true, dry: false, }), + // Copy static assets + new CopyWebpackPlugin({ + patterns: [ + { + from: 'src/assets', + }, + ], + }), new MiniCssExtractPlugin({ // Options similar to the same options in webpackOptions.output // both options are optional @@ -185,6 +187,16 @@ if (MODE === 'production') { }, }, }, + { + test: /\.css$/, + exclude: [/elm-stuff/, /node_modules/], + use: [MiniCssExtractPlugin.loader, 'css-loader?url=false'], + }, + { + test: /\.scss$/, + exclude: [/elm-stuff/, /node_modules/], + use: [MiniCssExtractPlugin.loader, 'css-loader?url=false', 'sass-loader'], + }, ], }, });