зеркало из https://github.com/mozilla/bugbug.git
Switch to snowpack for development and builds (#1980)
This commit is contained in:
Родитель
f19b66faa5
Коммит
a7c4f838ca
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -4,25 +4,16 @@
|
|||
"description": "To update Temporal polyfill:",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "webpack --config webpack.dev.js",
|
||||
"release": "webpack --config webpack.prod.js",
|
||||
"dev": "npx snowpack dev",
|
||||
"release": "npx snowpack build",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^6.3.2",
|
||||
"css-minimizer-webpack-plugin": "^1.1.5",
|
||||
"eslint-config-standard": "^16.0.2",
|
||||
"eslint-plugin-mozilla": "^2.9.1",
|
||||
"eslint-webpack-plugin": "^2.4.0",
|
||||
"html-webpack-plugin": "^4.5.0",
|
||||
"prettier": "^1.19.1",
|
||||
"webpack": "^5.9.0",
|
||||
"webpack-cli": "^4.2.0",
|
||||
"webpack-merge": "^5.4.0"
|
||||
"snowpack": "^2.17.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"apexcharts": "^3.6.12",
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
module.exports = {
|
||||
plugins: [
|
||||
/* ... */
|
||||
],
|
||||
installOptions: {
|
||||
/* ... */
|
||||
},
|
||||
devOptions: {
|
||||
/* ... */
|
||||
},
|
||||
buildOptions: {
|
||||
out: "dist",
|
||||
/* ... */
|
||||
},
|
||||
proxy: {
|
||||
/* ... */
|
||||
},
|
||||
mount: {
|
||||
"src": "/",
|
||||
/* ... */
|
||||
},
|
||||
alias: {
|
||||
/* ... */
|
||||
},
|
||||
};
|
|
@ -36,7 +36,7 @@
|
|||
</main>
|
||||
</div>
|
||||
|
||||
<script src="graph.js"></script>
|
||||
<script src="graph.js" type="module"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
</main>
|
||||
</div>
|
||||
|
||||
<script src="index.js"></script>
|
||||
<script src="index.js" type="module"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
@ -76,7 +76,7 @@
|
|||
</main>
|
||||
</div>
|
||||
|
||||
<script src="testing.js"></script>
|
||||
<script src="testing.js" type="module"></script>
|
||||
<script>
|
||||
</script>
|
||||
</body>
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
const path = require('path');
|
||||
const CopyPlugin = require("copy-webpack-plugin");
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
const ESLintPlugin = require('eslint-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
devtool: 'inline-source-map',
|
||||
entry: {
|
||||
index: './src/index.js',
|
||||
testing: './src/testing.js',
|
||||
graph: './src/graph.js',
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
},
|
||||
plugins: [
|
||||
// TODO: Fix eslint errors.
|
||||
// new ESLintPlugin(),
|
||||
new CleanWebpackPlugin(),
|
||||
new CopyPlugin({
|
||||
patterns: [
|
||||
{ context: "src", from: "*.html" },
|
||||
{ from: "src/css", to: "css" },
|
||||
],
|
||||
}),
|
||||
],
|
||||
};
|
|
@ -1,10 +0,0 @@
|
|||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'inline-source-map',
|
||||
devServer: {
|
||||
contentBase: './dist'
|
||||
}
|
||||
});
|
|
@ -1,13 +0,0 @@
|
|||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.common.js');
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
optimization: {
|
||||
minimizer: [
|
||||
`...`,
|
||||
new CssMinimizerPlugin(),
|
||||
],
|
||||
},
|
||||
});
|
Загрузка…
Ссылка в новой задаче