Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fe7b198

Browse files
committed
refactor: doc目录
1 parent e307bf9 commit fe7b198

32 files changed

+28
-20
lines changed

build/webpack.base.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ module.exports = {
1010
filename: 'vue-lay.common.js',
1111
path: resolve('../lib'),
1212
chunkFilename: 'vue-layui.common.js',
13-
publicPath: '/'
13+
publicPath: '/',
14+
library: 'VUE_LAYUI',
15+
libraryExport: 'default',
16+
libraryTarget: 'commonjs2'
1417
},
1518
resolve: {
1619
alias: {

build/webpack.config.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const base = require('./webpack.base');
88
module.exports = merge(base, {
99
mode: 'development',
1010
entry: {
11-
main: resolve('../src/main.js')
11+
main: resolve('../examples/doc/main.js')
1212
},
1313
output: {
1414
filename: 'js/[name].[hash:8].js',
@@ -21,6 +21,12 @@ module.exports = merge(base, {
2121
port: 3000,
2222
contentBase: './dist'
2323
},
24+
resolve: {
25+
alias: {
26+
vue$: 'vue/dist/vue.runtime.esm.js',
27+
'@': resolve('../src')
28+
}
29+
},
2430
module: {
2531
rules: [
2632
{
File renamed without changes.
File renamed without changes.

src/main.js renamed to examples/doc/main.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import Vue from 'vue';
2+
// import layui from '@';
3+
import layui from '../../lib/vue-lay.common';
4+
25
import App from './App.vue';
36
import router from './router';
47

5-
import layui from './index';
6-
78
import '@/assets/layui.css';
89
import '@/assets/layer.css';
910
import '@/assets/lay-date/laydate.css';
1011
import '@/assets/vue-layui.css';
1112
import 'highlight.js/styles/atom-one-dark.css';
1213

1314
import demoBlock from './components/demo-block.vue';
15+
console.log(layui);
1416
Vue.use(layui);
1517
Vue.config.productionTip = false;
1618
Vue.component('demo-block', demoBlock);
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)