You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
140 lines
5.1 KiB
JSON
140 lines
5.1 KiB
JSON
{
|
|
"*": {
|
|
"configuration": {
|
|
"config": {
|
|
"configName": "config",
|
|
"topScope": [
|
|
"const path = require('path');",
|
|
"const webpack = require('webpack');",
|
|
"\n",
|
|
"/*\n * SplitChunksPlugin is enabled by default and replaced\n * deprecated CommonsChunkPlugin. It automatically identifies modules which\n * should be splitted of chunk by heuristics using module duplication count and\n * module category (i. e. node_modules). And splits the chunks…\n *\n * It is safe to remove \"splitChunks\" from the generated configuration\n * and was added as an educational example.\n *\n * https://webpack.js.org/plugins/split-chunks-plugin/\n *\n */",
|
|
"const HtmlWebpackPlugin = require('html-webpack-plugin')",
|
|
"\n",
|
|
"/*\n * We've enabled HtmlWebpackPlugin for you! This generates a html\n * page for you when you compile webpack, which will make you start\n * developing and prototyping faster.\n * \n * https://github.com/jantimon/html-webpack-plugin\n * \n */"
|
|
],
|
|
"webpackOptions": {
|
|
"mode": "'development'",
|
|
"entry": "'./src/ext.isekai.discover.js'",
|
|
"output": {
|
|
"filename": "'[name].[chunkhash].js'",
|
|
"path": "path.resolve(__dirname, 'modules')"
|
|
},
|
|
"plugins": [
|
|
"new webpack.ProgressPlugin()",
|
|
"new HtmlWebpackPlugin()"
|
|
],
|
|
"module": {
|
|
"rules": [
|
|
{
|
|
"test": "/.(js|jsx)$/",
|
|
"include": [
|
|
"path.resolve(__dirname, 'src')"
|
|
],
|
|
"loader": "'babel-loader'",
|
|
"options": {
|
|
"plugins": [
|
|
"'syntax-dynamic-import'"
|
|
],
|
|
"presets": [
|
|
[
|
|
"'@babel/preset-env'",
|
|
{
|
|
"'modules'": false
|
|
}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"optimization": {
|
|
"splitChunks": {
|
|
"cacheGroups": {
|
|
"vendors": {
|
|
"priority": -10,
|
|
"test": "/[\\\\/]node_modules[\\\\/]/"
|
|
}
|
|
},
|
|
"chunks": "'async'",
|
|
"minChunks": 1,
|
|
"minSize": 30000,
|
|
"name": true
|
|
}
|
|
},
|
|
"devServer": {
|
|
"open": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"isekai-wiki": {
|
|
"configuration": {
|
|
"config": {
|
|
"configName": "config",
|
|
"topScope": [
|
|
"const path = require('path');",
|
|
"const webpack = require('webpack');",
|
|
"\n",
|
|
"/*\n * SplitChunksPlugin is enabled by default and replaced\n * deprecated CommonsChunkPlugin. It automatically identifies modules which\n * should be splitted of chunk by heuristics using module duplication count and\n * module category (i. e. node_modules). And splits the chunks…\n *\n * It is safe to remove \"splitChunks\" from the generated configuration\n * and was added as an educational example.\n *\n * https://webpack.js.org/plugins/split-chunks-plugin/\n *\n */",
|
|
"const HtmlWebpackPlugin = require('html-webpack-plugin')",
|
|
"\n",
|
|
"/*\n * We've enabled HtmlWebpackPlugin for you! This generates a html\n * page for you when you compile webpack, which will make you start\n * developing and prototyping faster.\n * \n * https://github.com/jantimon/html-webpack-plugin\n * \n */"
|
|
],
|
|
"webpackOptions": {
|
|
"mode": "'development'",
|
|
"entry": "'./src/ext.isekai.discover.js'",
|
|
"output": {
|
|
"filename": "'[name].[chunkhash].js'",
|
|
"path": "path.resolve(__dirname, 'modules')"
|
|
},
|
|
"plugins": [
|
|
"new webpack.ProgressPlugin()",
|
|
"new HtmlWebpackPlugin()"
|
|
],
|
|
"module": {
|
|
"rules": [
|
|
{
|
|
"test": "/.(js|jsx)$/",
|
|
"include": [
|
|
"path.resolve(__dirname, 'src')"
|
|
],
|
|
"loader": "'babel-loader'",
|
|
"options": {
|
|
"plugins": [
|
|
"'syntax-dynamic-import'"
|
|
],
|
|
"presets": [
|
|
[
|
|
"'@babel/preset-env'",
|
|
{
|
|
"'modules'": false
|
|
}
|
|
]
|
|
]
|
|
}
|
|
}
|
|
]
|
|
},
|
|
"optimization": {
|
|
"splitChunks": {
|
|
"cacheGroups": {
|
|
"vendors": {
|
|
"priority": -10,
|
|
"test": "/[\\\\/]node_modules[\\\\/]/"
|
|
}
|
|
},
|
|
"chunks": "'async'",
|
|
"minChunks": 1,
|
|
"minSize": 30000,
|
|
"name": true
|
|
}
|
|
},
|
|
"devServer": {
|
|
"open": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |