Skip to content

Commit 47e9b17

Browse files
fixed compilation error.
1 parent 6ad15cd commit 47e9b17

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

widgets/portfolio/debug.log

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[0114/221829.862:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)

widgets/portfolio/webpack.config.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
const HtmlWebpackPlugin = require('html-webpack-plugin');
22
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3+
const webpack = require('webpack');
34
const path = require('path');
5+
const DotEnv = require('dotenv').config({
6+
path: path.join(__dirname, '.env')
7+
});
48

59
module.exports = {
610
entry: ['./src/index.tsx'],
@@ -21,7 +25,10 @@ module.exports = {
2125
template: "./static/index.html",
2226
filename: "index.html"
2327
}),
24-
new MiniCssExtractPlugin()
28+
new webpack.DefinePlugin({
29+
"process.env": DotEnv.parsed
30+
}),
31+
new MiniCssExtractPlugin(),
2532
],
2633
resolve: {
2734
// Add '.ts' and '.tsx' as resolvable extensions.
@@ -51,8 +58,9 @@ module.exports = {
5158
enforce: "pre"
5259
},
5360
{
54-
test: /\.(css|scss)$/i,
55-
use: ['style-loader', 'css-loader', 'sass-loader']
61+
test: /\.(css)$/i,
62+
use: ['style-loader','css-loader']
63+
// use: ['style-loader', 'css-loader', 'sass-loader']
5664
// use: [MiniCssExtractPlugin.loader,'style-loader', 'css-loader', 'sass-loader']
5765
},
5866
{

0 commit comments

Comments
 (0)