/path/to/directory/with/static/files/script.js
- а веб-сервер ищет его в /path/to/directory/with/static/files/url/to/js/file/script.js
. Почитайте про префиксные локейшены и директиву alias. server {
if ($host = {ваш_домен}) {
return 301 http://$host$request_uri;
}
}
Все пакеты связанные с babel обновил до последних версий
babel-core
- старая версия семилетней давности, новая живёт тут: @babel/core.Now that Babel 7.x is out, I'll just say that this should essentially be resolved. The only time you should see this, with Babel 7.x, is if you're doing one of:
You've actually using import and module.exports in the same file, which is not allowed by Webpack. You can sidestep this by setting "modules": "commonjs", which will make Babel compile the import to a require. This breaks tree shaking, as mentioned above though, so fixing your code would be a better idea.
You're using useBultins: 'entry'/'usage, or @babel/plugin-transform-runtime, and you are running Babel on CommonJS files (either your own, or in random node_modules, if you're trying to compile that). Babel assumes files are ES modules by default, meaning those transforms would insert import statements into your file, triggering case 1. above. You can avoid this issue by setting sourceType: "unambiguous" in your Babel configuration, which will tell it to guess the type, like Webpack does, instead of assuming all files are modules.
RewriteEngine On
RewriteCond %{QUERY_STRING} ^(brand)=([^&]+)$
RewriteRule ^catalog/.+/$ https://my-site.ru/$0%1/%2/? [R=301,L]
"
если запустить команду вводимую