This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
687: Switch from brunch to webpack r=notriddle a=notriddle Brunch isn't really being maintained any more, and some of its deps are giving me security warnings. Co-authored-by: Michael Howell <michael@notriddle.com>
- Loading branch information
Showing
26 changed files
with
6,714 additions
and
7,049 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 |
---|---|---|
|
@@ -11,6 +11,7 @@ erl_crash.dump | |
|
||
# Static artifacts | ||
/node_modules | ||
/assets/node_modules | ||
|
||
# Generated documentation | ||
/doc | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"repository": {}, | ||
"license": "APACHE-2.0", | ||
"scripts": { | ||
"deploy": "webpack", | ||
"watch": "webpack --mode development --watch-stdin", | ||
"webpack": "webpack" | ||
}, | ||
"dependencies": { | ||
"phoenix": "file:../deps/phoenix", | ||
"phoenix_html": "file:../deps/phoenix_html" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.0.0", | ||
"@babel/preset-env": "^7.0.0", | ||
"babel-loader": "^8.0.0", | ||
"copy-webpack-plugin": "^4.5.0", | ||
"css-loader": "^2.1.1", | ||
"mini-css-extract-plugin": "^0.4.0", | ||
"optimize-css-assets-webpack-plugin": "^5.0.1", | ||
"terser-webpack-plugin": "^1.1.0", | ||
"webpack": "4.4.0", | ||
"webpack-cli": "^3.3.2" | ||
} | ||
} |
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
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,44 @@ | ||
const path = require('path'); | ||
const glob = require('glob'); | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
const TerserPlugin = require('terser-webpack-plugin'); | ||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | ||
const CopyWebpackPlugin = require('copy-webpack-plugin'); | ||
|
||
module.exports = (env, options) => ({ | ||
optimization: { | ||
minimizer: [ | ||
new TerserPlugin({ cache: true, parallel: true, sourceMap: false }), | ||
new OptimizeCSSAssetsPlugin({}) | ||
] | ||
}, | ||
entry: { | ||
'./js/app.js': glob.sync('./vendor/**/*.js').concat(['./js/app.js']) | ||
}, | ||
output: { | ||
filename: 'app.js', | ||
path: path.resolve(__dirname, '../priv/static/js') | ||
}, | ||
stats: { | ||
colors: !/^win/i.test(process.platform) | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: 'babel-loader' | ||
} | ||
}, | ||
{ | ||
test: /\.css$/, | ||
use: [MiniCssExtractPlugin.loader, 'css-loader'] | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new MiniCssExtractPlugin({ filename: '../css/app.css' }), | ||
new CopyWebpackPlugin([{ from: 'static/', to: '../' }]) | ||
] | ||
}); |
This file was deleted.
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
Oops, something went wrong.