зеркало из https://github.com/nextcloud/cookbook.git
Move package json to root
Initial config for asset chunking
This commit is contained in:
Родитель
ad53a5bebb
Коммит
8eb48f81d5
|
@ -11,8 +11,6 @@ js/*
|
|||
### NPM ###
|
||||
|
||||
# Node modules
|
||||
src/node_modules
|
||||
node_modules
|
||||
# Package lock
|
||||
src/package-lock.json
|
||||
# Temporary dist scripts
|
||||
src/dist/*.js*
|
||||
package-lock.json
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "nextcloud-cookbook",
|
||||
"version": "0.7.0",
|
||||
"description": "",
|
||||
"main": "main.js",
|
||||
"main": "src/main.js",
|
||||
"scripts": {
|
||||
"build": "node node_modules/webpack/bin/webpack.js --progress --hide-modules --config webpack.build.js",
|
||||
"dev": "node node_modules/webpack/bin/webpack.js --progress --watch --config webpack.devel.js",
|
||||
|
@ -31,7 +31,6 @@
|
|||
"babel-loader": "^8.1.0",
|
||||
"css-loader": "^3.5.2",
|
||||
"file-loader": "^6.0.0",
|
||||
"filemanager-webpack-plugin": "^2.0.5",
|
||||
"url-loader": "^4.1.0",
|
||||
"vue-loader": "^15.9.1",
|
||||
"vue-style-loader": "^4.1.2",
|
|
@ -1 +0,0 @@
|
|||
This is where Node and Webpack write the script files before tinyfying and moving them to the app js folder.
|
|
@ -1,18 +0,0 @@
|
|||
const merge = require('webpack-merge')
|
||||
const common = require('./webpack.config.js')
|
||||
const FileManager = require('filemanager-webpack-plugin')
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
devtool: 'source-map',
|
||||
plugins: [
|
||||
new FileManager({
|
||||
onEnd: {
|
||||
copy: [
|
||||
{ source: 'dist/script.js', destination: '../js/vue.js' },
|
||||
{ source: 'dist/script.js.map', destination: '../js/vue.js.map' }
|
||||
],
|
||||
},
|
||||
}),
|
||||
],
|
||||
})
|
|
@ -1,17 +0,0 @@
|
|||
const merge = require('webpack-merge')
|
||||
const common = require('./webpack.config.js')
|
||||
const FileManager = require('filemanager-webpack-plugin')
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'inline-cheap-source-map',
|
||||
plugins: [
|
||||
new FileManager({
|
||||
onEnd: {
|
||||
copy: [
|
||||
{ source: 'dist/script.js', destination: '../js/vue.js' }
|
||||
],
|
||||
},
|
||||
}),
|
||||
],
|
||||
})
|
|
@ -0,0 +1,7 @@
|
|||
const merge = require('webpack-merge')
|
||||
const common = require('./webpack.config.js')
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
devtool: 'source-map',
|
||||
})
|
|
@ -9,10 +9,14 @@ const { VueLoaderPlugin } = require('vue-loader')
|
|||
|
||||
module.exports = {
|
||||
|
||||
entry: path.join(__dirname, 'main.js'),
|
||||
entry:{
|
||||
script: path.join(__dirname, 'src', 'main.js'),
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'script.js',
|
||||
path: path.resolve(__dirname, './js'),
|
||||
publicPath: '/js/',
|
||||
filename: '[name].js',
|
||||
chunkFilename: '[name].js?v=[contenthash]',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
|
@ -0,0 +1,7 @@
|
|||
const merge = require('webpack-merge')
|
||||
const common = require('./webpack.config.js')
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'development',
|
||||
devtool: 'inline-cheap-source-map',
|
||||
})
|
Загрузка…
Ссылка в новой задаче