-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEP Upgrade frontend build stack (#182)
- Loading branch information
1 parent
978ffec
commit dc66fe8
Showing
12 changed files
with
4,871 additions
and
3,367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@silverstripe/eslint-config/.eslintrc'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
10 | ||
18 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env", | ||
"@babel/preset-react" | ||
] | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import 'bundles/ContentReviewForm.js'; | ||
import 'bundles/ContentReviewSettings.js'; | ||
import 'bundles/PagesDueForReview.js'; | ||
import 'bundles/ContentReviewForm'; | ||
import 'bundles/ContentReviewSettings'; | ||
import 'bundles/PagesDueForReview'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,26 @@ | ||
const Path = require('path'); | ||
// Import the core config | ||
const webpackConfig = require('@silverstripe/webpack-config'); | ||
const { | ||
resolveJS, | ||
externalJS, | ||
moduleJS, | ||
pluginJS, | ||
moduleCSS, | ||
pluginCSS, | ||
} = webpackConfig; | ||
const { JavascriptWebpackConfig, CssWebpackConfig } = require('@silverstripe/webpack-config'); | ||
|
||
const ENV = process.env.NODE_ENV; | ||
const PATHS = { | ||
MODULES: 'node_modules', | ||
FILES_PATH: '../', | ||
ROOT: Path.resolve(), | ||
SRC: Path.resolve('client/src'), | ||
DIST: Path.resolve('client/dist'), | ||
THIRDPARTY: Path.resolve('thirdparty'), | ||
}; | ||
|
||
const config = [ | ||
{ | ||
name: 'js', | ||
entry: { | ||
// Main JS bundle | ||
new JavascriptWebpackConfig('js', PATHS, 'silverstripe/contentreview') | ||
.setEntry({ | ||
contentreview: `${PATHS.SRC}/bundles/bundle.js`, | ||
}, | ||
output: { | ||
path: PATHS.DIST, | ||
filename: 'js/[name].js', | ||
}, | ||
devtool: (ENV !== 'production') ? 'source-map' : '', | ||
resolve: resolveJS(ENV, PATHS), | ||
externals: externalJS(ENV, PATHS), | ||
module: moduleJS(ENV, PATHS), | ||
plugins: pluginJS(ENV, PATHS), | ||
}, | ||
{ | ||
name: 'css', | ||
entry: { | ||
}) | ||
.getConfig(), | ||
// sass to css | ||
new CssWebpackConfig('css', PATHS) | ||
.setEntry({ | ||
contentreview: `${PATHS.SRC}/styles/bundle.scss`, | ||
}, | ||
output: { | ||
path: PATHS.DIST, | ||
filename: 'styles/[name].css' | ||
}, | ||
devtool: (ENV !== 'production') ? 'source-map' : '', | ||
module: moduleCSS(ENV, PATHS), | ||
plugins: pluginCSS(ENV, PATHS), | ||
}, | ||
}) | ||
.getConfig(), | ||
]; | ||
|
||
module.exports = config; |
Oops, something went wrong.