Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing vue2 alias to use the full build #763

Merged
merged 1 commit into from
May 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,28 @@

## 0.30.0

* [BC BREAK] The Vue "build" was changed from `vue.esm.js` (full build) to
`vue.runtime.esm.js` (runtime build). With the runtime build, there are
two things that you cannot do:

A) You cannot pass a string to `template`:

```js
weaverryan marked this conversation as resolved.
Show resolved Hide resolved
new Vue({
template: '<div>{{ hi }}</div>'
})
```

B) You cannot mount to a DOM element and use its HTML as your template:

```js
new Vue({
el: '#app', // where <div id="app"> contains your Vue template
});
```

If you need this behavior, call `Encore.addAliases({ vue$: 'vue/dist/vue.esm.js' });`

* [DEPENDENCY UPGRADE] `sass-loader` was upgraded from version 7 to 8.
See the [CHANGELOG](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md#800-2019-08-29)
for breaking changes. This likely will not affect you unless pass
Expand Down Expand Up @@ -38,6 +60,8 @@
thanks to @jdreesen.

* [DEPENDENCY UPGRADE] The `fork-ts-checker-webpack-plugin` package was upgraded for the tests

* The `fork-ts-checker-webpack-plugin` package was upgraded for the tests
from `^0.4.1` to `^4.0.0`. If you're using `enableForkedTypeScriptTypesChecking()`,
you control the `fork-ts-checker-webpack-plugin` version in your
`package.json` file. You should upgrade to `^4.0.0` to ensure
Expand Down
8 changes: 0 additions & 8 deletions lib/config-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const PluginPriorities = require('./plugins/plugin-priorities');
const applyOptionsCallback = require('./utils/apply-options-callback');
const sharedEntryTmpName = require('./utils/sharedEntryTmpName');
const copyEntryTmpName = require('./utils/copyEntryTmpName');
const getVueVersion = require('./utils/get-vue-version');
const tmp = require('tmp');
const fs = require('fs');
const path = require('path');
Expand Down Expand Up @@ -101,13 +100,6 @@ class ConfigGenerator {
alias: {}
};

if (this.webpackConfig.useVueLoader) {
const vueVersion = getVueVersion(this.webpackConfig);
if (vueVersion === 2) {
config.resolve.alias['vue$'] = 'vue/dist/vue.esm.js';
}
}

if (this.webpackConfig.usePreact && this.webpackConfig.preactOptions.preactCompat) {
config.resolve.alias['react'] = 'preact-compat';
config.resolve.alias['react-dom'] = 'preact-compat';
Expand Down