@empjs/plugin-vue2 3.0.0-alpha.2 → 3.0.0-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { VueLoaderPlugin } from 'vue-loader';
|
|
2
|
-
const importResolve = (o) => import.meta.resolve(o).replace('file://', '');
|
|
3
2
|
//
|
|
4
3
|
export default () => {
|
|
5
4
|
return {
|
|
6
5
|
name: '@empjs/plugin-vue2',
|
|
7
6
|
async rsConfig(store) {
|
|
7
|
+
//
|
|
8
|
+
const { importResolve } = store;
|
|
9
|
+
//
|
|
8
10
|
store.merge({ experiments: { css: false } });
|
|
9
11
|
// console.log(store.chain)
|
|
10
12
|
// store.chain.store('experiments').add({css:false})
|
|
@@ -12,6 +14,11 @@ export default () => {
|
|
|
12
14
|
// chain.resolve.alias.set('vue', '@vue/runtime-dom')
|
|
13
15
|
chain.resolve.alias.set('vue$', 'vue/dist/vue.runtime.esm.js');
|
|
14
16
|
chain.plugin('vue-loader-plugin').use(VueLoaderPlugin, []);
|
|
17
|
+
chain.module.rule('javascript').uses.clear().end();
|
|
18
|
+
chain.module.rule('typescript').uses.clear().end();
|
|
19
|
+
// chain.module.rules.delete('javascript').end()
|
|
20
|
+
// chain.module.rules.delete('typescript').end()
|
|
21
|
+
//
|
|
15
22
|
chain.module
|
|
16
23
|
.rule('vue-loader')
|
|
17
24
|
.test(/\.vue$/)
|
|
@@ -30,7 +37,7 @@ export default () => {
|
|
|
30
37
|
//
|
|
31
38
|
chain.module
|
|
32
39
|
.rule('vue-jsx')
|
|
33
|
-
.test(/\.jsx$/)
|
|
40
|
+
.test(/\.(js|jsx)$/)
|
|
34
41
|
.use('babel-loader')
|
|
35
42
|
.loader(importResolve('babel-loader'))
|
|
36
43
|
.options({
|
|
@@ -90,9 +97,9 @@ export default () => {
|
|
|
90
97
|
store.chain.merge({
|
|
91
98
|
module: {
|
|
92
99
|
rule: {
|
|
93
|
-
scripts: {
|
|
94
|
-
|
|
95
|
-
},
|
|
100
|
+
// scripts: {
|
|
101
|
+
// test: /\.(js|tsx?)$/,
|
|
102
|
+
// },
|
|
96
103
|
css: {
|
|
97
104
|
type,
|
|
98
105
|
},
|
|
@@ -109,7 +116,6 @@ export default () => {
|
|
|
109
116
|
},
|
|
110
117
|
});
|
|
111
118
|
//
|
|
112
|
-
chain.module.rule('svg').uses.clear().end();
|
|
113
119
|
//.use('vue-svg-loader').loader(importResolve('vue-svg-loader')).end()
|
|
114
120
|
},
|
|
115
121
|
};
|