Comments (8)
@JordyLangen it's seems to be working. I tested renaming app.js
to main.js
. By default app.js
is output for a development build, but as you can see in the image main.js
was output. The only change I made on your branch was adding the default value (i.e. vue-nx.config.js
) to the browser schema. Then I generated an app named my-app
and added a vue-nx.config.js
file at the root of the project.
from nx-plus.
What would be the preferred way to implement this?
@ZachJW34 and I are having offline discussions about this. We consider this a high priority issue, so I'll provide more details soon.
from nx-plus.
@DavainWhite The public folder is the Vue CLI equivalent of a static folder, as any files located within are copied (such as a favicon). Is this what you are looking for? If it is not, feel free to create an issue and we can move the conversation there.
from nx-plus.
@BuckyMaler thanks for pushing me into the right direction. I have something working now, going clean that up and refactor it. Should be able to open a PR soon.
from nx-plus.
What would be the preferred way to implement this? I'm using this project in a proof of concept at work, and would need this feature. I'd be willing to contribute.
from nx-plus.
@JordyLangen we've decided this issue should be handled by adding support for configureWebpack
. Down the road we'd also like to add support for chainWebpack
and vue.config.js
, but we think supporting configureWebpack
is best for now because it can be delivered the fastest.
It'd be great if you could open a PR for this. Sorry we don't have contributing docs at this time.
From the perspective of a user, the way this should work is a user would add a file to their project that exports an object or function as described in the Vue CLI docs. For example:
module.exports = {
// webpack mods
};
or
module.exports = config => {
// webpack mods
return config;
};
That file would be required inside of a builder, set as an inline option, and handed off to Vue CLI.
To start off, you'd want to add configureWebpack
as an option to the browser builder here. It should be of type string. Its value would be the path to the webpack file relative to the workspace. Then inside of the builder you'd add configureWebpack
as an inline option here and assign to it the object or function exported from the user's webpack file. You'd then repeat this for the dev server and library builders.
To test your changes manually you can run nx e2e vue-e2e
, which will run e2e tests, and then cd
into tmp/nx-e2e/proj
. The tests may take a while to run, so you may want to add an only
to the first test so that only that test runs. I have an open PR to improve the development experience.
Let me know if there's anything else I can do to help.
from nx-plus.
could you guys add a static folder in the next release It's hard to get anything running if I cant even add a favicon or manifest to the site.
from nx-plus.
@BuckyMaler I'm wondering if you could help me out. I have this implementation right here: https://github.com/JordyLangen/nx-plus/tree/feature/62-add-vue-configure-webpack-support
The impl. right now requires you to put place a vue-nx.config.js
in the root of the project directory.
This works and the builder resolves this file, and adds the configureWebpack
to the inlineOptions
.
I added a ProvidePlugin
with jQuery
for testing purposes, but it does not seem to work, nor do I get any error messages. I logged the inlineOptions
after it was built, and could see the correct configureWebpack
value was in there. Any ideas?
from nx-plus.
Related Issues (20)
- Add NX 14.3.X Support HOT 3
- high severity vulnerabilities
- How do you get source maps to work?
- Composing generators requires '@angular-devkit/schematics' HOT 3
- Cannot start freshly generated vue app due to "Rule can only have one resource source" error HOT 14
- Error "Cannot read properties of null (reading 'npmScope')" when generating docusaurus app
- When building with nx-plus/vue, lots of command windows pop up. Can this be suppressed?
- Build options "generatePackageJson" in project.json for Create package.json
- Support for Paths resolve for SASS files inside .vue component HOT 1
- vue3-jest Issue : nx test myAppName HOT 1
- Resolve dependency conflict with @nrwl/workspace@15 HOT 3
- @nx-plus/nuxt:static dont behavior like nuxt generate ignoring dir folder on nuxt.config HOT 2
- @nx-plus/nuxt - possibility to add port on project.json HOT 1
- [vite] `appRootPath` is undefined in `vite.config.ts`
- seeing 'formats' is not found in schema HOT 1
- Support nuxt.config.ts
- TS18002: The 'files' list in config file 'tsconfig.json' is empty.
- Nx moving JS graph building to new location HOT 1
- Is @nx-plus/docusaurus 15.0.0-rc.0 stable? HOT 1
- @nx-plus/docusaurus with nx@16 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx-plus.