no longer bundle css files within js files
This commit is contained in:
@@ -54,7 +54,7 @@ class MainController extends Controller
|
|||||||
// $str = \OC::$server->getDatabaseConnection()->getInner()->getPrefix();
|
// $str = \OC::$server->getDatabaseConnection()->getInner()->getPrefix();
|
||||||
//$config = \OC::$server->getAppConfig();
|
//$config = \OC::$server->getAppConfig();
|
||||||
OC_Util::addScript($this->appName, 'app');
|
OC_Util::addScript($this->appName, 'app');
|
||||||
// OC_Util::addStyle($this->appName, 'table');
|
OC_Util::addStyle($this->appName, 'app');
|
||||||
$params = $this->buildParams();
|
$params = $this->buildParams();
|
||||||
$response = new TemplateResponse($this->appName, 'Index', $params);
|
$response = new TemplateResponse($this->appName, 'Index', $params);
|
||||||
return $response;
|
return $response;
|
||||||
|
|||||||
@@ -68,6 +68,7 @@
|
|||||||
"vue-loader": "^16.0.0-beta.10",
|
"vue-loader": "^16.0.0-beta.10",
|
||||||
"vue-svg-loader": "^0.17.0-beta.2",
|
"vue-svg-loader": "^0.17.0-beta.2",
|
||||||
"webpack": "^5.69.0",
|
"webpack": "^5.69.0",
|
||||||
"webpack-cli": "^4.9.0"
|
"webpack-cli": "^4.9.0",
|
||||||
|
"mini-css-extract-plugin": "^2.6.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,6 @@
|
|||||||
></div>
|
></div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import Http from "../lib/http";
|
|
||||||
import helper from "../utils/helper";
|
import helper from "../utils/helper";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
script("ncdownloader", 'appSettings');
|
script("ncdownloader", 'appSettings');
|
||||||
style("ncdownloader", "settings");
|
style("ncdownloader", 'appSettings');
|
||||||
extract($_);
|
extract($_);
|
||||||
?>
|
?>
|
||||||
<div class="ncdownloader-admin-settings">
|
<div class="ncdownloader-admin-settings">
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
script("ncdownloader", 'appSettings');
|
script("ncdownloader", 'appSettings');
|
||||||
style("ncdownloader", "autocomplete");
|
style("ncdownloader", 'appSettings');
|
||||||
style("ncdownloader", "settings");
|
|
||||||
extract($_);
|
extract($_);
|
||||||
$time_map = array('i' => 'minutes', 'h' => 'hours', 'w' => 'weeks', 'd' => 'days', 'y' => 'years');
|
$time_map = array('i' => 'minutes', 'h' => 'hours', 'w' => 'weeks', 'd' => 'days', 'y' => 'years');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
const path = require('path');
|
const path = require('path');
|
||||||
const webpack = require('webpack');
|
const webpack = require('webpack');
|
||||||
const { VueLoaderPlugin } = require('vue-loader')
|
const { VueLoaderPlugin } = require('vue-loader')
|
||||||
|
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
/* experiments: {
|
/* experiments: {
|
||||||
asset: true
|
asset: true
|
||||||
},*/
|
},*/
|
||||||
entry: {
|
entry: {
|
||||||
app: './src/index.js',
|
app: './src/index.js',
|
||||||
appSettings: './src/settings.js'
|
appSettings: './src/settings.js'
|
||||||
@@ -31,8 +32,10 @@ module.exports = {
|
|||||||
{
|
{
|
||||||
test: /\.s?[ac]ss$/i,
|
test: /\.s?[ac]ss$/i,
|
||||||
use: [
|
use: [
|
||||||
|
//Create standalone css files
|
||||||
|
MiniCssExtractPlugin.loader,
|
||||||
// Creates `style` nodes from JS strings
|
// Creates `style` nodes from JS strings
|
||||||
"style-loader",
|
// "style-loader",
|
||||||
// Translates CSS into CommonJS
|
// Translates CSS into CommonJS
|
||||||
"css-loader",
|
"css-loader",
|
||||||
// Compiles Sass to CSS
|
// Compiles Sass to CSS
|
||||||
@@ -49,11 +52,11 @@ module.exports = {
|
|||||||
use: 'vue-loader'
|
use: 'vue-loader'
|
||||||
},
|
},
|
||||||
/*{ test: /\.css$/, use: ['vue-style-loader', 'css-loader'] },*/
|
/*{ test: /\.css$/, use: ['vue-style-loader', 'css-loader'] },*/
|
||||||
{
|
{
|
||||||
test: /\.tsx?$/,
|
test: /\.tsx?$/,
|
||||||
use: 'ts-loader',
|
use: 'ts-loader',
|
||||||
exclude: /node_modules/,
|
exclude: /node_modules/,
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
@@ -77,6 +80,9 @@ module.exports = {
|
|||||||
jquery: "jQuery",
|
jquery: "jQuery",
|
||||||
"window.jQuery": "jquery"
|
"window.jQuery": "jquery"
|
||||||
}),
|
}),
|
||||||
|
new MiniCssExtractPlugin({
|
||||||
|
filename: '../css/[name].css',
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
externals: {
|
externals: {
|
||||||
jquery: 'jQuery',
|
jquery: 'jQuery',
|
||||||
|
|||||||
Reference in New Issue
Block a user