Toggle navigation
Toggle navigation
This project
Loading...
Sign in
강연욱
/
myYoutube
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
2
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Flare-k
2020-06-09 01:00:41 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
034c01eba902b4431af7ed4a3d04b8d5006990d9
034c01eb
1 parent
541dc5b5
[Test] Webpack
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
2 deletions
asset/js/main.js
asset/scss/style.scss
package.json
webpack.config.js
asset/js/main.js
0 → 100644
View file @
034c01e
import
"../scss/style.scss"
;
asset/scss/style.scss
0 → 100644
View file @
034c01e
body
{
background-color
:
red
;
}
package.json
View file @
034c01e
...
...
@@ -4,7 +4,9 @@
"description"
:
"make Youtube Website"
,
"main"
:
"app.js"
,
"scripts"
:
{
"start"
:
"nodemon --exec babel-node init.js --delay 2"
"dev:server"
:
"nodemon --exec babel-node init.js --delay 2"
,
"dev:assets"
:
"WEBPACK_ENV=development webpack"
,
"build:assets"
:
"WEBPACK_ENV=production webpack"
},
"repository"
:
{
"type"
:
"git"
,
...
...
@@ -20,11 +22,14 @@
"cookie-parser"
:
"^1.4.5"
,
"dotenv"
:
"^8.2.0"
,
"express"
:
"^4.17.1"
,
"extract-text-webpack-plugin"
:
"^4.0.0-beta.0"
,
"helmet"
:
"^3.22.0"
,
"mongoose"
:
"^5.9.15"
,
"morgan"
:
"^1.10.0"
,
"multer"
:
"^1.4.2"
,
"pug"
:
"^2.0.4"
"pug"
:
"^2.0.4"
,
"webpack"
:
"^4.43.0"
,
"webpack-cli"
:
"^3.3.11"
},
"devDependencies"
:
{
"eslint"
:
"^6.8.0"
,
...
...
webpack.config.js
0 → 100644
View file @
034c01e
const
path
=
require
(
"path"
);
const
ExtractCSS
=
require
(
"extract-text-webpack-plugin"
);
const
MODE
=
process
.
env
.
WEBPACK_ENV
;
const
ENTRY_FILE
=
path
.
resolve
(
__dirname
,
"assets"
,
"js"
,
"main.js"
);
const
OUTPUT_DIR
=
path
.
join
(
__dirname
,
"static"
);
const
config
=
{
entry
:
ENTRY_FILE
,
mode
:
MODE
,
module
:
{
rules
:
[
{
test
:
/
\.(
scss|sass
)
$/
,
use
:
ExtractCSS
.
extract
(
{
loader
:
"css-loader"
,
},
{
loader
:
"postcss-loader"
,
},
{
loader
:
"sass-loader"
,
}
),
},
],
},
output
:
{
path
:
OUTPUT_DIR
,
filename
:
"[name].[format]"
,
},
};
module
.
exports
=
config
;
Please
register
or
login
to post a comment