Skip to content

Commit 98cd74e

Browse files
author
Walker Leite
committed
fix modulesify prefixes in node_modules
1 parent ee4f31b commit 98cd74e

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

template/client/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import Vue from 'vue';
22
import App from './App.vue';
33

4+
import 'static/main.css';
5+
46
new Vue({
57
el: '#app',
68
render: (r) => r(App),

template/client/static/main.css

Whitespace-only changes.

template/gulp-tasks/build.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,16 @@ gulp.task('build:client', ['copy:client'], () => {
3333
dirs.buildClient,
3434
'bundle.css',
3535
),
36-
global: true
36+
global: true,
37+
generateScopedName: function(name, filename) {
38+
var matches = filename.match(/^\/node_modules/);
39+
if (matches) return name;
40+
if (process.env.NODE_ENV === 'production') {
41+
return modulesify.generateShortName(name, filename);
42+
} else {
43+
return modulesify.generateLongName(name, filename);
44+
}
45+
}
3746
});
3847

3948
return b.bundle()

0 commit comments

Comments
 (0)