actualizar webpacker

This commit is contained in:
f 2020-11-19 20:35:29 -03:00
parent 207d1f6732
commit b5be8299d9
11 changed files with 1923 additions and 1247 deletions

7
.gitignore vendored
View file

@ -48,3 +48,10 @@ yarn-debug.log*
*.key
*.crt
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity

View file

@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: '2.6'
TargetRubyVersion: '2.7'
Style/AsciiComments:
Enabled: false

View file

@ -178,7 +178,7 @@ GEM
netaddr (>= 2.0.4, < 3)
simpleidn
errbase (0.2.0)
erubi (1.9.0)
erubi (1.10.0)
eventmachine (1.2.7)
exception_notification (4.4.3)
actionmailer (>= 4.0, < 7)
@ -531,7 +531,7 @@ GEM
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.7)
tzinfo (1.2.8)
thread_safe (~> 0.1)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
@ -559,7 +559,7 @@ GEM
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.4.0)
zeitwerk (2.4.1)
PLATFORMS
ruby

View file

@ -9,23 +9,19 @@ assets := package.json yarn.lock $(shell find app/assets/ app/javascript/ -type
alpine_version := 3.12
public/assets-production: $(assets)
rm -rf $@
RAILS_ENV=production bundle exec rake assets:precompile
mv public/assets $@
public/assets-production/: $(assets)
RAILS_ENV=production bundle exec rake assets:precompile webpacker:compile assets:clean
rsync --delete-after -a public/assets/ $@
find $@ -type f -name "*.gz" | sed -re "s/\.gz$$//" | xargs -r brotli -k -9
public/packs-production: public/packs
rm -rf $@
mv $< $@
find $@ -type f | xargs -r brotli -k -9
mkdir -p $<
touch $@
public/packs-production/: public/packs/
rsync -a --delete-after $< $@
find $@ -type f -name "*.gz" | sed -re "s/\.gz$$//" | xargs -r brotli -k -9
assets: public/assets-production public/packs-production
assets: public/assets-production/ public/packs-production/
serve:
bundle exec rails s -b "ssl://0.0.0.0:3000?key=config/sutty.local.key&cert=config/sutty.local.crt"
bundle exec rails s -b "ssl://0.0.0.0:3000?key=../sutty.local/domain/sutty.local.key&cert=../sutty.local/domain/sutty.local.crt"
# Limpiar los archivos de testeo
clean:

View file

@ -15,6 +15,9 @@
// const images = require.context('../images', true)
// const imagePath = (name) => images(name, true)
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import { Application } from 'stimulus'
import { definitionsFromContext } from "stimulus/webpack-helpers"

View file

@ -1,5 +1,3 @@
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import { Controller } from 'stimulus'
require("leaflet/dist/leaflet.css")

View file

@ -1,5 +1,3 @@
import 'core-js/stable'
import 'regenerator-runtime/runtime'
import { Controller } from 'stimulus'
/*

View file

@ -18,7 +18,7 @@ module.exports = function(api) {
return {
presets: [
isTestEnv && [
require('@babel/preset-env').default,
'@babel/preset-env',
{
targets: {
node: 'current'
@ -26,7 +26,7 @@ module.exports = function(api) {
}
],
(isProductionEnv || isDevelopmentEnv) && [
require('@babel/preset-env').default,
'@babel/preset-env',
{
forceAllTransforms: true,
useBuiltIns: 'entry',
@ -37,32 +37,30 @@ module.exports = function(api) {
]
].filter(Boolean),
plugins: [
require('babel-plugin-macros'),
require('@babel/plugin-syntax-dynamic-import').default,
isTestEnv && require('babel-plugin-dynamic-import-node'),
require('@babel/plugin-transform-destructuring').default,
'babel-plugin-macros',
'@babel/plugin-syntax-dynamic-import',
isTestEnv && 'babel-plugin-dynamic-import-node',
'@babel/plugin-transform-destructuring',
[
require('@babel/plugin-proposal-class-properties').default,
'@babel/plugin-proposal-class-properties',
{
loose: true
}
],
[
require('@babel/plugin-proposal-object-rest-spread').default,
'@babel/plugin-proposal-object-rest-spread',
{
useBuiltIns: true
}
],
[
require('@babel/plugin-transform-runtime').default,
'@babel/plugin-transform-runtime',
{
helpers: false,
regenerator: true,
corejs: false
helpers: false
}
],
[
require('@babel/plugin-transform-regenerator').default,
'@babel/plugin-transform-regenerator',
{
async: false
}

View file

@ -6,12 +6,11 @@ default: &default
public_root_path: public
public_output_path: packs
cache_path: tmp/cache/webpacker
check_yarn_integrity: false
webpack_compile_output: false
webpack_compile_output: true
# Additional paths webpack should lookup modules
# ['app/assets', 'engine/foo/app/assets']
resolved_paths: []
additional_paths: []
# Reload manifest.json on all requests so we reload latest compiled packs
cache_manifest: false
@ -52,9 +51,6 @@ development:
<<: *default
compile: true
# Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
check_yarn_integrity: true
# Reference: https://webpack.js.org/configuration/dev-server/
dev_server:
https: true
@ -69,6 +65,7 @@ development:
disable_host_check: true
use_local_ip: false
quiet: false
pretty: false
headers:
'Access-Control-Allow-Origin': '*'
watch_options:

View file

@ -3,7 +3,7 @@
"private": true,
"dependencies": {
"@rails/actiontext": "^6.0.0",
"@rails/webpacker": "^4.0.7",
"@rails/webpacker": "5.2.1",
"commonmark": "^0.29.0",
"input-map": "git+https://0xacab.org/sutty/input-map.git",
"input-tag": "git+https://0xacab.org/sutty/input-tag.git",
@ -15,6 +15,6 @@
"zepto": "^1.2.0"
},
"devDependencies": {
"webpack-dev-server": "^3.8.0"
"webpack-dev-server": "^3.11.0"
}
}

3091
yarn.lock

File diff suppressed because it is too large Load diff