1
0
mirror of https://github.com/phuoc-ng/csslayout.git synced 2025-08-06 06:07:33 +02:00

Merge pull request #38 from phuoc-ng/fix-webpack

Rename public -> dist
This commit is contained in:
phuoc-ng
2019-11-23 12:57:17 +07:00
committed by GitHub
3 changed files with 6 additions and 6 deletions

2
.gitignore vendored
View File

@@ -1,2 +1,2 @@
public dist
node_modules node_modules

View File

@@ -1,10 +1,10 @@
{ {
"name": "csslayout", "name": "csslayout",
"scripts": { "scripts": {
"copy": "cp client/index.html public && cp robots.txt public && cp sitemap.xml public", "copy": "cp client/index.html dist && cp robots.txt dist && cp sitemap.xml dist",
"dev": "npm run copy && webpack --mode development", "dev": "npm run copy && webpack --mode development",
"dev-server": "npm run copy && webpack-dev-server", "dev-server": "npm run copy && webpack-dev-server",
"prebuild": "rm -rf public/* && npm run copy", "prebuild": "rm -rf dist/* && npm run copy",
"build": "webpack --mode production", "build": "webpack --mode production",
"export": "react-snap", "export": "react-snap",
"postbuild": "npm run export" "postbuild": "npm run export"
@@ -29,7 +29,7 @@
"webpack-dev-server": "^3.9.0" "webpack-dev-server": "^3.9.0"
}, },
"reactSnap": { "reactSnap": {
"source": "public", "source": "dist",
"minifyHtml": { "minifyHtml": {
"collapseWhitespace": false, "collapseWhitespace": false,
"removeComments": false "removeComments": false

View File

@@ -3,7 +3,7 @@ const path = require('path');
module.exports = { module.exports = {
entry: './client/index.jsx', entry: './client/index.jsx',
output: { output: {
path: path.join(__dirname, 'public'), path: path.join(__dirname, 'dist'),
filename: 'bundle.js', filename: 'bundle.js',
}, },
module: { module: {
@@ -24,6 +24,6 @@ module.exports = {
}, },
devtool: 'cheap-module-eavl-source-map', devtool: 'cheap-module-eavl-source-map',
devServer: { devServer: {
contentBase: path.join(__dirname, 'public') contentBase: path.join(__dirname, 'dist')
}, },
}; };